• Hi everyone,

    i am currently getting a null pointer exception when i try to send an http request through the gadgetbridge.
    The code im using looks like this

    Bangle.http("https://www.google.com/").t­hen(data=>{
            E.showMessage('got ');
          }).catch((err) => {
            f.write("error_log.txt",err.toString());­
          E.showMessage('err' + err.toString());
          });
    

    and the exception(which is being printed on the second "showMessage" command) i getting is

    com.android.volley.VolleyError: java.lang.NullPointerException: Attempt to invoke interface method 'java.util.Set java.util.Map.keySet()' on a null object reference
    

    Im using the android and version 0.68.0b-bangles Commit 9da7fef3e of the Bangle.js Gadgetbridge app. On the Banglejs itself runs the Android Integration App v 0.15 and the watch is connected to the Gadgetbridge app. The permission to use the internet is granted.

    Do you have an idea how to fix this?

  • I get the same error when using A-GPS Data and OpenWeatherMap weather provider since I updated to 0.68.0b. Looks like something broke in that version.

  • Is there a way to download the previous verison or do i have to build it localy?

  • If you backed up the APK you could technically uninstall the current version and sideload the previous one.

  • It looks like you may be able to make this work with:

    Bangle.http("https://www.google.com/",{h­eaders:{}}).then(data=>{
    

    But I'll try and get a fix in now so this should be in the nightlies

  • Thanks @Gordon!

  • Worked for me, thanks

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Nullpointer exception by http request through Gadgetbridge

Posted by Avatar for user148386 @user148386

Actions