You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2020/07/13 00:50:37 UTC

[GitHub] [cordova-plugin-network-information] Chadori opened a new issue #122: Version 2.0.2 from npmjs is crashing some devices with Android 10, on startup.

Chadori opened a new issue #122:
URL: https://github.com/apache/cordova-plugin-network-information/issues/122


   # Bug Report
   
   ## Problem
   Version [2.0.2 from npmjs](https://www.npmjs.com/package/cordova-plugin-network-information) is crashing some devices with Android 10, on startup.
   
   
   ### What is expected to happen?
   Run on Android Studio. You can also reproduce from the AVD Emulator **(Android 10, Pixel3A)**.
   
   
   ### What does actually happen?
   Crashes on startup.
   
   
   ## Information
   <!-- Include all relevant information that might help understand and reproduce the problem -->
   ```
   Uncaught exception from plugin:
   Connectivity Service : Neither user 10381 nor current process has android.permission.ACCESS_NETWORK_STATE
   ```
   ![image](https://user-images.githubusercontent.com/31282960/87260596-57558a00-c4e5-11ea-8c0c-065bf28c7369.png)
   
   Possible similar case: https://stackoverflow.com/questions/24552015/java-lang-securityexception-connectivityservice-neither-user-10134-nor-current
   
   ### Environment, Platform, Device
   <!-- In what environment, on what platform or on which device are you experiencing the issue? -->
   Android 10, Pixel 3A.
   
   
   ## Checklist
   <!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
   
   - [x] I searched for existing GitHub issues
   - [x] I updated all Cordova tooling to most recent version
   - [x] I included all the necessary information above
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-network-information] Chadori commented on issue #122: Version 2.0.2 from npmjs is crashing some devices with Android 10, on startup.

Posted by GitBox <gi...@apache.org>.
Chadori commented on issue #122:
URL: https://github.com/apache/cordova-plugin-network-information/issues/122#issuecomment-657306973


   Got it, I will confirm. Thanks.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-network-information] Chadori commented on issue #122: Version 2.0.2 from npmjs is crashing some devices with Android 10, on startup.

Posted by GitBox <gi...@apache.org>.
Chadori commented on issue #122:
URL: https://github.com/apache/cordova-plugin-network-information/issues/122#issuecomment-657305271


   Hi, 
   
   Here are the build versions.
   ```
   Cordova-Android : 8.1.0
   android-minSdkVersion: 28
   android-targetSdkVersion: 28
   ```
   
   Thank you.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-network-information] breautek commented on issue #122: Version 2.0.2 from npmjs is crashing some devices with Android 10, on startup.

Posted by GitBox <gi...@apache.org>.
breautek commented on issue #122:
URL: https://github.com/apache/cordova-plugin-network-information/issues/122#issuecomment-657537909


   Let me know if this issue can be closed.
   
   If not, then I think we'll need a [sample reproduction app](https://github.com/apache/cordova-contribute/blob/master/create-reproduction.md) to continue.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-network-information] Chadori commented on issue #122: Version 2.0.2 from npmjs is crashing some devices with Android 10, on startup.

Posted by GitBox <gi...@apache.org>.
Chadori commented on issue #122:
URL: https://github.com/apache/cordova-plugin-network-information/issues/122#issuecomment-657330505


   Hi again,
   
   Yes, I can confirm it has that permission.
   It seems I can reproduce if I run it on `Pixel 3A - API29` but not on `Pixel 3A - API 28` even after changing the `target-sdk` to `29`.
   ![image](https://user-images.githubusercontent.com/31282960/87265937-904a2a80-c4f6-11ea-8edf-2a090a441235.png)
   
   Can you confirm? Thanks.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-network-information] breautek commented on issue #122: Version 2.0.2 from npmjs is crashing some devices with Android 10, on startup.

Posted by GitBox <gi...@apache.org>.
breautek commented on issue #122:
URL: https://github.com/apache/cordova-plugin-network-information/issues/122#issuecomment-657306559


   Hmm, I'm not reproducing this with a simple cordova app on an android 10 emulator.
   
   It looks like for some reason, your app is missing the `<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />` declaration in your `AndroidManifest.xml` file. This is something the plugin adds on installation.
   
   Can you confirm that line exists inside `<project-root>/platforms/android/app/src/main/AndroidManifest.xml`? It should appear as a child of the `<manifest>` tag somewhere.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-network-information] Chadori closed issue #122: Version 2.0.2 from npmjs is crashing some devices with Android 10, on startup.

Posted by GitBox <gi...@apache.org>.
Chadori closed issue #122:
URL: https://github.com/apache/cordova-plugin-network-information/issues/122


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-network-information] Chadori commented on issue #122: Version 2.0.2 from npmjs is crashing some devices with Android 10, on startup.

Posted by GitBox <gi...@apache.org>.
Chadori commented on issue #122:
URL: https://github.com/apache/cordova-plugin-network-information/issues/122#issuecomment-657659752


   Since I'm not sure what's causing this yet, I'll just close this and make a new thread if any case there is really something wrong.
   Thanks.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-network-information] breautek commented on issue #122: Version 2.0.2 from npmjs is crashing some devices with Android 10, on startup.

Posted by GitBox <gi...@apache.org>.
breautek commented on issue #122:
URL: https://github.com/apache/cordova-plugin-network-information/issues/122#issuecomment-657340096


   Nope, I still do not experience a device crash on a Pixel 3A, using a simple test app that alerts on network change (which it fires once on launch).
   
   Previously I tested on an existing emulator I had, which was based on Pixel 2, but I'm pretty sure these are just skins and don't actually change the behaviour of the app (other than screen resolutions and some other technical details like total memory)
   
   It's weird that you see the permission tag inside `AndroidManifest.xml` but having an error that suggest your app doesn't have that permission.
   
   The next thing I'd confirm is if your apk actually has those permissions listed.  You can check this by using the `aapt` tool:
   
   `aapt d permissions <path/to/apk>`
   
   You may need to add the android build tools to your path in order to use `aapt`. The executable should be located at: `$ANDROID_HOME/build-tools/29.0.2/`
   
   Note that your build tools version may vary.
   
   The expected output of the `aapt` command above should be something like:
   ```
   $ aapt d permissions app-debug.apk 
   package: com.bt.network
   uses-permission: name='android.permission.INTERNET'
   uses-permission: name='android.permission.ACCESS_NETWORK_STATE'
   ```
   
   If `ACCESS_NETWORK_STATE` is missing, then there is something happening between writing the `AndroidManifest.xml` and actually building the apk. Or the `AndroidManifest.xml` is improper. If this is the case, we'd need to see if we can build a sample reproduction app that includes the minimal amount of configuration necessary to reproduce the problem. Since I haven't been able to reproduce it myself, it seems likely there might be another plugin causing a conflict.
   
   Here's a list of others things you can try:
   - Reinstalling the the plugin and/or the platform
   - Updated android sdk/build tools. Since you're using cordova-android@8/ android sdk 28, you should be using build tools 28.
   - Consider upgrading to cordova-android@9 & updating  android sdk to 29 / build tools 29
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-network-information] Chadori commented on issue #122: Version 2.0.2 from npmjs is crashing some devices with Android 10, on startup.

Posted by GitBox <gi...@apache.org>.
Chadori commented on issue #122:
URL: https://github.com/apache/cordova-plugin-network-information/issues/122#issuecomment-657352546


   I've tried on `Cordova Android 9.0.0` but there are still some startup crashes `(not sure if it's still related to the permissions now, since the errors are gone and it's still using target28 even on CA-9.0.0.)`. I'm suspecting it's the exporter having issues, I'm going to check the from the engine's side, that I'm using, instead.
   
   Thank you for the help. 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-network-information] breautek commented on issue #122: Version 2.0.2 from npmjs is crashing some devices with Android 10, on startup.

Posted by GitBox <gi...@apache.org>.
breautek commented on issue #122:
URL: https://github.com/apache/cordova-plugin-network-information/issues/122#issuecomment-657304754


   What is your target SDK (or if you don't explicitly set it, what is your version of `cordova-android`)?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org