Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not open app built by v7.1.3 #570

Closed
CS-Tao opened this issue Nov 22, 2018 · 18 comments
Closed

Can not open app built by v7.1.3 #570

CS-Tao opened this issue Nov 22, 2018 · 18 comments
Labels

Comments

@CS-Tao
Copy link

CS-Tao commented Nov 22, 2018

My app was built successfully by Travis-ci, but it flash back unexpectedly when launch.
It works yesterday when built with v7.1.2. Does anybody know what caused this?

I have tried to upgrade build-tools version from 26.0.2 to 28.0.3, but it still can not work.

Files:

Travis-ci build logs (For same commit)

@janpio janpio added the support label Nov 22, 2018
@janpio
Copy link
Member

janpio commented Nov 22, 2018

Hi @CS-Tao, help me reproduce this please:
Can I just check out the develop branch of your app at https://github.com/CS-Tao/whu-library-seat-mobile/tree/develop and then install with cordova-android 7.1.2 to get a working app and then change to 7.1.3 to see that it does not work any more?

@CS-Tao
Copy link
Author

CS-Tao commented Nov 22, 2018

@janpio Yes, please. Many thanks!

@janpio
Copy link
Member

janpio commented Nov 22, 2018

I have tried to upgrade build-tools version from 26.0.2 to 28.0.3, but it still can not work.

Why do you think this could be related and help?

@oliversalzburg
Copy link

@CS-Tao What exactly do you mean by "flash back unexpectedly"?

@CS-Tao
Copy link
Author

CS-Tao commented Nov 22, 2018

@janpio I'm not sure. And just have a try, because I found that build-tools version has been changed in ".travis.yml" of this repo in v7.1.3.

@CS-Tao
Copy link
Author

CS-Tao commented Nov 22, 2018

@CS-Tao What exactly do you mean by "flash back unexpectedly"?

Just I can't open my app, it exited when I try to open it.

@janpio
Copy link
Member

janpio commented Nov 22, 2018

Ok, I could reproduce your problem:

  • 7.1.3: "Unfortunately, whu-library-seat-mobile has stopped."
  • 7.1.2: starts, but then crashes because no index.html in www.

How can I build the actual web app in www so I can confirm that 7.1.2 really works?

Update: node build/build.js seems to do the trick. Waiting for it to finish now.

@janpio janpio added bug and removed support labels Nov 22, 2018
@janpio
Copy link
Member

janpio commented Nov 22, 2018

Ok, I can confirm that your app built with 7.1.2 works and intended, but crashes on startup with "Unfortunately, whu-library-seat-mobile has stopped." when built with 7.1.3. This looks like a bug to me - we will investigate.

@CS-Tao
Copy link
Author

CS-Tao commented Nov 22, 2018

Ok, I could reproduce your problem:

  • 7.1.3: "Unfortunately, whu-library-seat-mobile has stopped."
  • 7.1.2: starts, but then crashes because no index.html in www.

How can I build the actual web app in www so I can confirm that 7.1.2 really works?

run yarn build before yarn release:android like scripts in .travis.yml

@janpio
Copy link
Member

janpio commented Nov 22, 2018

I am using npm locally, but executing node build/build.js built a www that could be shown on the device.

@janpio
Copy link
Member

janpio commented Nov 22, 2018

Just to make sure this is not a general problem:
A new project created with cordova create and then cordova platform add [email protected] can be built and started just fine - so this is not a general problem of cordova-android 7.1.3 but something with your app (setup, plugins, ...). We will continue to investigate.

@CS-Tao
Copy link
Author

CS-Tao commented Nov 22, 2018

Okay. Thank you~

@janpio janpio added support and removed bug labels Nov 22, 2018
@janpio
Copy link
Member

janpio commented Nov 22, 2018

I used adb logcat (h/t @oliversalzburg) to monitor the log output of the device, got this on app start:

11-22 11:52:17.703 11103 11103 E AndroidRuntime: java.lang.RuntimeException: Unable to get provider de.appplant.cordova.plugin.notification.util.AssetProvider: java.lang.ClassNotFoundException: Didn't find class "de.appplant.cordova.plugin.notification.util.AssetProvider" on path: DexPathList[[zip file "/data/app/cc.cs_tao.whu_library_seat_mobile-1/base.apk"],nativeLibraryDirectories=[/data/app/cc.cs_tao.whu_library_seat_mobile-1/lib/arm, /vendor/lib, /system/lib]]
11-22 11:52:17.703 11103 11103 E AndroidRuntime:        at android.app.ActivityThread.installProvider(ActivityThread.java:5156)
11-22 11:52:17.703 11103 11103 E AndroidRuntime:        at android.app.ActivityThread.installContentProviders(ActivityThread.java:4748)
11-22 11:52:17.703 11103 11103 E AndroidRuntime:        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4688)
11-22 11:52:17.703 11103 11103 E AndroidRuntime:        at android.app.ActivityThread.-wrap1(ActivityThread.java)
11-22 11:52:17.703 11103 11103 E AndroidRuntime:        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1405)
11-22 11:52:17.703 11103 11103 E AndroidRuntime:        at android.os.Handler.dispatchMessage(Handler.java:102)
11-22 11:52:17.703 11103 11103 E AndroidRuntime:        at android.os.Looper.loop(Looper.java:148)
11-22 11:52:17.703 11103 11103 E AndroidRuntime:        at android.app.ActivityThread.main(ActivityThread.java:5417)
11-22 11:52:17.703 11103 11103 E AndroidRuntime:        at java.lang.reflect.Method.invoke(Native Method)
11-22 11:52:17.703 11103 11103 E AndroidRuntime:        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
11-22 11:52:17.703 11103 11103 E AndroidRuntime:        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
11-22 11:52:17.703 11103 11103 E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "de.appplant.cordova.plugin.notification.util.AssetProvider" on path: DexPathList[[zip file "/data/app/cc.cs_tao.whu_library_seat_mobile-1/base.apk"],nativeLibraryDirectories=[/data/app/cc.cs_tao.whu_library_seat_mobile-1/lib/arm, /vendor/lib, /system/lib]]
11-22 11:52:17.703 11103 11103 E AndroidRuntime:        at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
11-22 11:52:17.703 11103 11103 E AndroidRuntime:        at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
11-22 11:52:17.703 11103 11103 E AndroidRuntime:        at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
11-22 11:52:17.703 11103 11103 E AndroidRuntime:        at android.app.ActivityThread.installProvider(ActivityThread.java:5141)
11-22 11:52:17.703 11103 11103 E AndroidRuntime:        ... 10 more
11-22 11:52:17.703 11103 11103 E AndroidRuntime:        Suppressed: java.lang.ClassNotFoundException: de.appplant.cordova.plugin.notification.util.AssetProvider
11-22 11:52:17.703 11103 11103 E AndroidRuntime:                at java.lang.Class.classForName(Native Method)
11-22 11:52:17.703 11103 11103 E AndroidRuntime:                at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
11-22 11:52:17.703 11103 11103 E AndroidRuntime:                at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
11-22 11:52:17.703 11103 11103 E AndroidRuntime:                at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
11-22 11:52:17.703 11103 11103 E AndroidRuntime:                ... 12 more
11-22 11:52:17.703 11103 11103 E AndroidRuntime:        Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available
11-22 11:52:17.704  1910  3271 W ActivityManager:   Force finishing activity cc.cs_tao.whu_library_seat_mobile/.MainActivity

Removing the plugin fixed the crash.

You were using a beta version of this plugin anyway:
cordova-plugin-local-notification 0.9.0-beta.2 "LocalNotification"
Try upgrading to the available beta3 or downgrade to an older, stable version.

If upgrading to beta does not help, please report the problem at the plugin's repository issues, I didn't see an existing one on a first look.

@janpio
Copy link
Member

janpio commented Nov 22, 2018

If using the newer version of the plugin doesn't work, please also report back here - maybe this is indeed caused by 7.1.3. Someone else from the team will look into this then.

@janpio janpio added bug and removed support labels Nov 22, 2018
@janpio
Copy link
Member

janpio commented Nov 22, 2018

Further investigation showed that this is indeed a problem of cordov-androida. The plugin files are copied to different places in 7.1.3 than they were in 7.1.2, which causes the plugin to crash. In your case it was cordova-plugin-local-notifications, but it could theoretically affect lots of other plugins as well.

We will continue investigating and provide a fix asap. Until then: Best stay with 7.1.2 @CS-Tao .

@jcesarmobile
Copy link
Member

Closing in favour of #571 as it contains the key problem. But thanks for reporting and being so cooperative!

@brodycj
Copy link
Contributor

brodycj commented Nov 22, 2018

#571 is now fixed in master. Will be fixed in nightly build and upcoming patch release, details in #571 (comment).

@brodycj
Copy link
Contributor

brodycj commented Nov 23, 2018

7.1.4 patch release is now published to resolve the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants