Download Word - Crosswalk

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
[XWALK-3961] Application Crash: Must use or extend XWalkApplication Created:
16/Apr/15 Updated: 18/May/15 Resolved: 03/May/15
Status:
Project:
Component/s:
Affects
Version/s:
Fix Version/s:
Resolved
Crosswalk Project
Crosswalk Project for Android
Crosswalk 14
Type:
Reporter:
Resolution:
Labels:
Remaining
Estimate:
Time Spent:
Original
Estimate:
Bug
Hirbod (Inactive)
Fixed
TC-NONEED
Not Specified
OS:
Severity:
CC:
Reporter
Domain:
Android
Critical
Balestrieri, Francesco
nightstomp.com (Find related issues)
None
Priority:
Assignee:
Votes:
P1
Lin Sun
0
Not Specified
Not Specified
Description
I've just got some crash reports at google play from users with
Device: lifetab_s1034x
Android: 4.4
I can't reproduce this bug nor how to fix it. It seems to be related to Xwalk.
I'm using the canaray version 14.42.329.0 Link (maybe this is the main problem, but I have to,
cause I need that new transparency feature)
Is this something known? Do you know, how to fix this? Or is this maybe fixed in some newer
canaray versions? Thank you very much!
junit.framework.AssertionFailedError: Must use or extend XWalkApplication
at junit.framework.Assert.fail(Assert.java:50)
at org.xwalk.core.XWalkCoreWrapper.findSharedCore(XWalkCoreWrapper.java:146)
at org.xwalk.core.XWalkCoreWrapper.check(XWalkCoreWrapper.java:58)
at org.xwalk.core.XWalkCoreWrapper.check(XWalkCoreWrapper.java:51)
at org.xwalk.core.XWalkActivity.onStart(XWalkActivity.java:84)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1171)
at android.app.Activity.performStart(Activity.java:5241)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2197)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2273)
at android.app.ActivityThread.access$800(ActivityThread.java:138)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1236)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:149)
at android.app.ActivityThread.main(ActivityThread.java:5045)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:794)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:610)
at dalvik.system.NativeStart.main(Native Method)
Comments
Comment by Hirbod (Inactive) [ 16/Apr/15 ]
Is this maybe related to that commit:
https://github.com/crosswalkproject/crosswalk/commit/4ac738eed1654d943fa4f9df4b5ca3e8a81f68cf
If yes, could you tell me, which Canary-Version has included that fix (if so) ?
Comment by liudeyi (Inactive) [ 16/Apr/15 ]
hi Hirbod
Could you please share us test app or source code to reproduce this issue?
Comment by Raphael Kubo da Costa [ 17/Apr/15 ]
Reassigning to Lin Sun since it's related to code he wrote.
Comment by Hirbod (Inactive) [ 19/Apr/15 ]
Hi liudeyi
I'm so sorry, but this is a very big app and I'm not able to share the source code with you.
And I can't even tell you why this crash happens, as it seems to be only 2 users with the same
"Lifetab" device having this issues.
I can tell, that I have two applications in store, one with arm and one with x86.
This is my app:
https://play.google.com/store/apps/details?id=net.nachbarschaft
If you want, I can provide you guys an test-user (but the application is still in german,
translation to english will be integrated soon)
I don't know how to reproduce this, I've just received the crash logs and bad * star reporting due
this crashes.
Comment by Lin Sun [ 19/Apr/15 ]
Hirbod I'd like to confirm several things:
1. Are you packaging your app with make_apk.py script or just using the embedding API?
2. Are you using shared mode?
Comment by Hirbod (Inactive) [ 20/Apr/15 ]
Hi Lin Sun,
thanks for your response. I'm not using make-apk, I've build my two binaries with "cordova
build android --release" (once with arm included, then with x86)
I don't know if I use the shared mode, I guess not, just used the migration tutorial to migrate
from Cordova to crosswalk.
Comment by Lin Sun [ 20/Apr/15 ]
Hirbod I think probably the following factors interacted and resulted in your problem:
1. Shared mode is triggered. If you hadn't built your app in shared mode intentionally, then most
likely your app was running on mismatched architecture, e.g. ARM version running on IA
device.
2. I suppose you might changed some default configuration. Please have a look at the
AndroidManifest.xml, can you see the application tag as below:
<application android:name="org.apache.cordova.CordovaApplication"
......
Comment by Hirbod (Inactive) [ 21/Apr/15 ]
Lin Sun I've never touched something on the shared mode side. Just created to different APKs
and uploaded them to play store. Maybe Google is doing something wrong and delivers the
wrong apk to that life tab? Arm instead of x86 <=> x86 instead of arm. (Is this possible?)
My manifest file is Cordova default, I'm in the road now but I will post it to you later that day.
I just have a ARM Mobilephone but tested the x86 versions on genymotion and they are
working properly so I guess there will be no way to determine what happened on that specific
device (which is till now the only application with that crash report)
Comment by Balestrieri, Francesco [ 21/Apr/15 ]
Hirbod did you follow this procedure to upload the x86 APK? https://software.intel.com/enus/xdk/docs/submitting-multiple-crosswalk-apk-to-google-play-store
Comment by Hirbod (Inactive) [ 21/Apr/15 ]
Balestrieri, Francesco I've did not use the build system nor the make_apk tool.
Ive just placed the armeabi-v7a inside of
myapp/platforms/android/CordovaLib/xwalk_core_library/libs
ant debug
rm -Rf ant-gen
rm -Rf ant-build
cd ../../..
cordova build android —-release
then, I've removed the armeabi-v7a folder and replaced it with x86 folder and did the same steps
as mentioned.
The upload process in advanced mode worked well on google play store side and as I told
before, the play store on genymotion got recognized correctly as x86 and the install-process
worked fine and the app did not crash. Some on ARM, so I'm dead sure, that my two binaries
are correct.
The only thing I could Imagine, that there could be a bug on google play store side, delivering
the wrong APK to this "Lifetab" device, but I do not have this device so I can't test it.
Comment by Hirbod (Inactive) [ 21/Apr/15 ]
Lin Sun
as I promised, here is my manifest-file
<?xml version='1.0' encoding='utf-8'?>
<manifest android:hardwareAccelerated="true" android:versionCode="30200"
android:versionName="3.2.0" package="net.nachbarschaft"
xmlns:android="http://schemas.android.com/apk/res/android">
<supports-screens android:anyDensity="true" android:largeScreens="true"
android:normalScreens="true" android:resizeable="true"
android:smallScreens="true" android:xlargeScreens="false" />
<uses-permission android:name="android.permission.INTERNET" />
<application android:hardwareAccelerated="true"
android:icon="@drawable/icon" android:label="@string/app_name"
android:supportsRtl="false">
<activity
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale"
android:label="@string/activity_name" android:launchMode="singleTop"
android:name="MainActivity" android:screenOrientation="portrait"
android:windowSoftInputMode="adjustResize">
<intent-filter android:label="@string/launcher_name">
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<data android:scheme="nachbarschaft" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
</intent-filter>
</activity>
<activity android:label="@string/app_name"
android:name="com.facebook.LoginActivity"
android:theme="@android:style/Theme.Translucent.NoTitleBar" />
<activity android:exported="true"
android:name="com.plugin.gcm.PushHandlerActivity" />
<receiver android:name="com.plugin.gcm.CordovaGCMBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE"
/>
<action
android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="net.nachbarschaft" />
</intent-filter>
</receiver>
<service android:name="com.plugin.gcm.GCMIntentService" />
<meta-data android:name="com.facebook.sdk.ApplicationId"
android:value="@string/fb_app_id" />
<activity android:label="@string/fb_app_name"
android:name="com.facebook.LoginActivity"
android:theme="@android:style/Theme.Translucent.NoTitleBar" />
<meta-data android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
<meta-data android:name="com.google.android.maps.v2.API_KEY"
android:value="PRIVATE...." />
</application>
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="21" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"
/>
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission
android:name="com.google.android.c2dm.permission.RECEIVE" />
<permission android:name="net.nachbarschaft.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="net.nachbarschaft.permission.C2D_MESSAGE"
/>
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
/>
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"
/>
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission
android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"
/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"
/>
<uses-feature android:glEsVersion="0x00020000" android:required="true" />
</manifest>
Comment by Hirbod (Inactive) [ 21/Apr/15 ]
I guess I missed to run:
android update project --subprojects --path . --target "android-21"
after I've changed the binary. Is this something important?
Comment by Lin Sun [ 22/Apr/15 ]
Then there is the problem. You've just updated the library files but left others unchanged. Please
run ./bin/create in the home directory of the latest Crosswalk-Cordova package to create a
default Cordova project, then check the Androidmanifest.xml. You can see the application tag is
not using default Application class anymore.
But if your app runs on mismatched architecture and triggered shared mode, this will only help
to prevent from crashing, your app still can't run well.
Comment by Hirbod (Inactive) [ 22/Apr/15 ]
I've just follwed your migration steps. What is missing inside of my Androidmanifest.xml ? Can
I write it down manually?
Comment by Hirbod (Inactive) [ 22/Apr/15 ]
Seems like the problem came trough playstore. x86 lib need to have the higher versioncode,
were arm should have the lower version-code (eg. 3.2.6 and 3.2.5)
This is caused trough multiple architecture support. After changing, lifetab seems to get the
correct APK file.
Comment by Lin Sun [ 22/Apr/15 ]
For your Android manifest, just use the CordovaApplication class instead of the default
Application class. But I strongly suggest you update whole CordovaLib and cordova directory
for the release you want to follow up.
Comment by tinazhao (Inactive) [ 03/May/15 ]
Per bug scrub meeting, looks like we had a solution already. So resolved. Feel free to let me
know if you have comment. Thanks.
Generated at Sun Apr 30 07:47:06 PDT 2017 using JIRA 7.2.7#72009sha1:68b7d86b7e8716f76c1f28a5095acccf67bb75b1.