×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    Registered User
    Join Date
    Aug 2013
    Posts
    21

    erros in http operation

    Hi.
    I am developing an S40 App that needs to receive information from a webserver.
    In the emulator everything works fine. However, in the mobile (Asha 311 with firmware version 07.36) , following problems arise:

    Even though mobile has WiFi connected, mobile doesn't send nor receive info through webservice. it ignores WiFi and I get
    java.io.IOException: 29-Error in HTTP operation “Network Link is disallowed to use and closed”

    If I use Mobile data connection, mobile is able to send info through web service but unable to receive
    And I get following error:
    java.io.IOException: 28-Error in HTTP operation “Network Link closed”


    Any idea how to solve these two issues?
    BTW - this is an unsigned app (still underdevelopment - but I think should not be this, the problem. Or could it be?

    Cheers
    Dinis

  2. #2
    Registered User
    Join Date
    May 2008
    Location
    Surat Thani
    Posts
    258

    Re: erros in http operation

    Hi,

    Make sure you have the HTTP related permissions listed in the application descriptor / manifest:

    Code:
    MIDlet-Permissions-Opt: javax.microedition.io.Connector.http,javax.microedition.io.Connector.https

  3. #3
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,073

    Re: erros in http operation

    Check the HTTP URL that you are trying to request from your app, directly through device browser and see if goes thru ?
    If the Mobile data plan is set properly or not.
    Also - check the application settings - allow network call permissions to your installed app and then try again.
    thanks,
    ~Amitabh
    (Champion of the Month -Aug'13)
    Follow me on my blog for Innovative Mobile Apps

  4. #4
    Registered User
    Join Date
    Aug 2013
    Posts
    21

    Re: errors in http operation

    Hi.
    Thanks, TongMuan.

    I have, in the descriptor,

    MIDlet-Permissions: javax.microedition.pim.ContactList.read,javax.microedition.io.Connector.socket
    MIDlet-Permissions-Opt: javax.microedition.io.Connector.http, javax.microedition.io.Connector.https

    but I keep getting same errors and same symptoms.

    :P
    Last edited by dinisbr; 2013-09-06 at 16:48.

  5. #5
    Nokia Developer Champion
    Join Date
    Feb 2008
    Location
    Ahmedabad, Gujarat, India
    Posts
    3,852

    Re: errors in http operation

    Hello dinisbr,

    I think amit has a valid point here, you need to check you data connection in your mobile device !!

  6. #6
    Registered User
    Join Date
    Aug 2013
    Posts
    21

    Re: errors in http operation

    Thanks for your input, Gaba.
    But I am positively sure I have data connection, wifi connection, etc.

    Is there a way I can contact anyone from Nokia? They are making these things - they should know something about it, no?

    CHeers

  7. #7
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,073

    Re: erros in http operation

    Quote Originally Posted by dinisbr View Post
    Hi.
    I am developing an S40 App that needs to receive information from a webserver.
    In the emulator everything works fine. However, in the mobile (Asha 311 with firmware version 07.36) , following problems arise:

    Even though mobile has WiFi connected, mobile doesn't send nor receive info through webservice. it ignores WiFi and I get
    java.io.IOException: 29-Error in HTTP operation “Network Link is disallowed to use and closed”

    If I use Mobile data connection, mobile is able to send info through web service but unable to receive
    And I get following error:
    java.io.IOException: 28-Error in HTTP operation “Network Link closed”


    Any idea how to solve these two issues?
    BTW - this is an unsigned app (still underdevelopment - but I think should not be this, the problem. Or could it be?

    Cheers
    Dinis
    Webservies API's are creating this problem (not working on wifi in Asha 311 #7.36), try simple HTTP request to google.co.in and check if you are able to read data from it on the stream.
    If yes, encode HTTP request for webservices on your own.
    thanks,
    ~Amitabh
    (Champion of the Month -Aug'13)
    Follow me on my blog for Innovative Mobile Apps

  8. #8
    Registered User
    Join Date
    Aug 2013
    Posts
    21

    Re: erros in http operation

    Quote Originally Posted by im2amit View Post
    Webservies API's are creating this problem (not working on wifi in Asha 311 #7.36), try simple HTTP request to google.co.in and check if you are able to read data from it on the stream.
    If yes, encode HTTP request for webservices on your own.
    Hi.
    Thanks again for your help.

    Now, instead of webservice, we comunicte through http only (parsing http reply). this is what we get:
    We are now able to send and receive data only and only through mobile data.

    When we disconnect mobile Data connection, even if WiFi is set as the first option, it will act as if there is no data connection. It simply ignores WiFi (WiFi is working because browser works).
    Is there any WiFi specific Midlet permission? We are not finding any.

    Might this be related to not having the app signed (doesn't make sense but...)?

    Cheers
    Dinis
    Last edited by dinisbr; 2013-09-17 at 18:52.

  9. #9
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,073

    Re: erros in http operation

    Quote Originally Posted by dinisbr View Post
    Hi.
    Thanks again for your help.

    Now, instead of webservice, we comunicte through http only (parsing http reply). this is what we get:
    We are now able to send and receive data only and only through mobile data.

    When we disconnect mobile Data connection, even if WiFi is set as the first option, it will act as if there is no data connection. It simply ignores WiFi (WiFi is working because browser works).
    Is there any WiFi specific Midlet permission? We are not finding any.

    Might this be related to not having the app signed (doesn't make sense but...)?

    Cheers
    Dinis
    If your app is able to connect to the required services on mobile data and it fails on Wifi - it means that your app is perfect.
    You can try on some other devices or someother firmware version... few other people have also reported similar issue on this #7.36 in 311.

    For testing if wifi is working with other J2me apps on the device - try opera mini- download its j2me version for S40.
    thanks,
    ~Amitabh
    (Champion of the Month -Aug'13)
    Follow me on my blog for Innovative Mobile Apps

  10. #10
    Registered User
    Join Date
    Aug 2013
    Posts
    21

    Re: erros in http operation

    Quote Originally Posted by im2amit View Post
    If your app is able to connect to the required services on mobile data and it fails on Wifi - it means that your app is perfect.
    You can try on some other devices or someother firmware version... few other people have also reported similar issue on this #7.36 in 311.

    For testing if wifi is working with other J2me apps on the device - try opera mini- download its j2me version for S40.
    Thanks.
    Doesn't install the Package from Opera mini. It keeps asking me to turn on Mobile data connection.
    I have WiFi ON and mobile data connection OFF. I am able to reach opera site (through stock browser), download the package but when starts to install says ("mobile data connection has been turned Off...). Then it says ""Unable to connect to the Internet. Please check your settings".

    I already posted a bug a few days ago and updated today (http://developer.nokia.com/bugs/show_bug.cgi?id=1342). I am really upset that this guys from Nokia are not paying attention to bug reporting. Now I start to understand why developers run away from Nokia - if when you develop a very simple app you cannot rely on the documentation and then there models that work and others that don't (I already tried other firmware versions on this model and did not work either),you cannot tell your users that you have an working app - so you just tell them to use other platform - I guess that is what is happening :P.

    thanks again for your help, im2amit

  11. #11
    Nokia Developer Champion
    Join Date
    Mar 2003
    Posts
    4,104

    Re: erros in http operation

    Quote Originally Posted by dinisbr View Post
    I already posted a bug a few days ago …
    Just as a note: The bug reporting feature is unmonitored, or said differently: dead, since last year.

    Anyway, this solved your problem, didn’t it? Then, please mark that bug report as solved.

  12. #12
    Registered User
    Join Date
    Aug 2013
    Posts
    21

    Re: erros in http operation

    Hi Traud.
    Thanks again.
    Yes - it solved in a Geecky way. I still need to find the means how to supply the solution to customers who are not tech savvy.
    So, I have hard times to declare the problem as solved.
    In my opinion, that is a patch that enables power users to circumvent the problem - not a solution for final consumer.


    Nokia should fix the need for this patch completely. Or, at least give us, developers, a way (eg - xml.prov file) to make those changes on our side, leaving the final customer in peace as a simple final user, not needing to go into learning Geek.

    Does it make sense what I say?

    Cheers

    Dinis

  13. #13
    Nokia Developer Champion
    Join Date
    Mar 2003
    Posts
    4,104

    Re: erros in http operation

    It does not make sense, because that is the way since the Nokia 6300i which was released in 2008.

    The problem was approached via Nokia Support Discussions which contains an in-depth analysis (Source). Two solutions were provided, one in Nokia Support Discussions (Source) and one with detailed pictures here in the Nokia Developer Wiki (Source).
    Quote Originally Posted by bloodredsky
    actually there is nothing "special" included in the faulty operator settings [send over-the-air (OTA)], instead there is one parameter (which should be normally always included) missing.
    Nokia Series 40 Wi-Fi requires a preferred access-point within the network-operator configuration.
    Nokia Series 40 ship with a set of default configurations, once loaded when a SIM is inserted.

    If that default configuration contains a web account with a proxy, the preferred access-point is not used. Therefore, Wi-Fi does not start when this web account is used. If you use HTTP or HTTPS, the web account is used. Nokia Series 40 Wi-Fi requires a ‘<parm name="TO-NAPID" value="INTERNET"/>’ with the Open Mobile Alliance Client-Provisioning (OMA CP) XML file.

    If the default configuration does not contain a preferred access-point at all, or said differently ‘<parm name="INTERNET" />’ is missing in the NAPDEF, both socket and HTTP connections are not routed via Wi-Fi at all.

    Or stated differently: The network operators do not even know they disable Wi-Fi. They cannot be blamed directly.

    Now, with so many Wi-Fi enabled Series 40, we all see it in custumer support. Obviously this is not important to Nokia. Otherwise Nokia would have fixed this long ago.
    By the way (let us fix it from the other part): In the year 2007 only 25 operators worldwide required a proxy in their configuration at all. And most of these cases were just a trick to surf cheaper. Now in the year 2013 not one operator should require a proxy anymore. Still, the default configurations on each Nokia Series shipped today still contain proxy-based configurations.

    The new Asha Software Platform 1.0 has the same issue. Still testing 1.1, though.

    For us developers, the only solution is to live with it. It looks very strange when ‘our’ single Java MIDlet requires the user to change his/her setting. Why is our Java MIDlet so special when every other Java MIDlet does not require that? This fiddling around on customer phones confuses trust in our Java MIDlets. If customers do not get Wi-Fi working, they return the phone and perhaps one day somebody at Nokia looks at it more deeply.
    Last edited by traud; 2013-10-23 at 08:18.

  14. #14
    Registered User
    Join Date
    Aug 2013
    Posts
    21

    Re: erros in http operation

    hehe.
    We did try the sockets path before turning to http .
    I started this thread because i was getting java.io.IOException: 29-Error in HTTP operation as well as 28 errors.
    At that moment I was communication through webservice and using
    MIDlet-Permissions: javax.microedition.pim.ContactList.read,javax.microedition.io.Connector.socket
    MIDlet-Permissions-Opt: javax.microedition.io.Connector.http, javax.microedition.io.Connector.https

    After lots of hassle and a kind suggestion of im2amit, we decided to go into http. and we were able to do what we needed: communicate a string to server and receive another string as response.

    But now we are dealing with this extra hurdle.
    If you have any suggestion on how to avoid initial problem by using sockets, I'd be very glad to start all over and try using sockets.

    Thanks again for your interest and help.

    Cheers

  15. #15
    Nokia Developer Champion
    Join Date
    Mar 2003
    Posts
    4,104

    Re: erros in http operation

    Quote Originally Posted by dinisbr View Post
    We did try the sockets path before turning to http.
    Please correct me, however, WebServices use SOAP. SOAP uses HTTP. And HTTP uses the web account in your Nokia Series 40 which is faulty. My recommendation is to use sockets on a port other than 80, 8080, or 443 (see JTWI JSR-185 for a detailed why). Of course your remote server has to run on this very different port.

    In that case, not the WAP (called web in Nokia Series 40) but the Internet (called preferred access-point) account is used. Then, Wi-Fi is used automatically. There are a rare number of configuration which do not offer a preferred access-point, as well (see my post above), however, from my practical experience this number is much less than that proxy issue. Nevertheless, you face another issue in customer support then: Those customers affected by this (very rare) bug, are going to blame your Java MIDlet rather then the phone because many of the internal apps (like the web browser) might work – but not your MIDlet. That happens, because those customers do not own other Java MIDlets which use sockets.

    Therefore, Opera Mini used an auto-detection mechanism (to connect at all). They cannot (like you) determine whether Wi-Fi is used. That was your bug-1 (detection of Wi-Fi) which is actually a feature request, as this is not implemented the way you think it should be. Therefore, I think, you have a much bigger problem: Connect your customers at all.

    Why are you so much into this Wi-Fi thing? What is your MIDlet about? If you cannot share, you can send me private message. Perhaps there is a complete different approach to all this mess.

Page 1 of 2 12 LastLast

Similar Threads

  1. 8-Error in HTTP operation
    By angelvini210 in forum Mobile Java General
    Replies: 9
    Last Post: 2013-03-30, 14:30
  2. Error in Http Operation
    By bpomatrix in forum Mobile Java General
    Replies: 7
    Last Post: 2012-02-17, 12:52
  3. Error in HTTP operation
    By gorec in forum Mobile Java Networking & Messaging & Security
    Replies: 12
    Last Post: 2010-05-06, 17:53
  4. Error in HTTP operation
    By developer-che in forum Mobile Java Networking & Messaging & Security
    Replies: 3
    Last Post: 2007-08-13, 11:37

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •