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

IllegalArgumentException when starting SearchNearestActivity #89

Closed
menion opened this issue Aug 2, 2017 · 6 comments
Closed

IllegalArgumentException when starting SearchNearestActivity #89

menion opened this issue Aug 2, 2017 · 6 comments

Comments

@menion
Copy link

menion commented Aug 2, 2017

For unknown reason, since today, SearchNearestActivity started to crash. Update to latest (today 2. 8. 2017) version, restart of device, re-install, clear data, using without login ... does not help.

Crash log:

Process: com.arcao.geocaching4locus, PID: 11317
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.arcao.geocaching4locus/com.arcao.geocaching4locus.SearchNearestActivity}: java.lang.IllegalArgumentException: invalid qualifier: 14 RC
   at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2947)
   at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3008)
   at android.app.ActivityThread.-wrap14(ActivityThread.java)
   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1650)
   at android.os.Handler.dispatchMessage(Handler.java:102)
   at android.os.Looper.loop(Looper.java:154)
   at android.app.ActivityThread.main(ActivityThread.java:6688)
   at java.lang.reflect.Method.invoke(Native Method)
   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1468)
   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1358)

Caused by: java.lang.IllegalArgumentException: invalid qualifier: 14 RC
   at org.osgi.framework.Version.validate(SourceFile:190)
   at org.osgi.framework.Version.<init>(SourceFile:157)
   at org.osgi.framework.Version.parseVersion(SourceFile:220)
   at com.arcao.geocaching4locus.util.LocusTesting.isLocusInstalled(SourceFile:17)
   at com.arcao.geocaching4locus.SearchNearestActivity.onCreate(SourceFile:97)
   at android.app.Activity.performCreate(Activity.java:6912)
   at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1126)
   at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2900)
   at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3008) 
   at android.app.ActivityThread.-wrap14(ActivityThread.java) 
   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1650) 
   at android.os.Handler.dispatchMessage(Handler.java:102) 
   at android.os.Looper.loop(Looper.java:154) 
   at android.app.ActivityThread.main(ActivityThread.java:6688) 
   at java.lang.reflect.Method.invoke(Native Method) 
   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1468) 
   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1358) 

Click on "Import GC" ends with same issue ( just with ImportFromGCActivity activity ). Start from Locus Map app or from list of installed apps make no difference.

I tried all I had in mind, but no change. Also no update or something like this happen on my device and I'm sure it worked three days ago. Any idea? I tried to find something on SO, but no success ... mystery.

@arcao
Copy link
Owner

arcao commented Aug 2, 2017

It looks like the OSGi Version class, which I use for version comparation, doesn't like Locus Map version qualifier part.

@menion
Copy link
Author

menion commented Aug 2, 2017

Cannot say I understand :). Is there something I may do/help? Interesting that is started few days ago without any obvious reason. Same issue with latest public Locus Map version, so it looks like mobile dependent, not Locus Map dependent.

@arcao
Copy link
Owner

arcao commented Aug 2, 2017

In add-on is built-in check for required Locus Map version and it seems the version returned with LocusUtils.getActiveVersion(context).getVersionName() is not valid for that version check code (I suspect the space between 14 and RC).
Could you please tell me the complete version name to I could check it?

Thanks!

@menion
Copy link
Author

menion commented Aug 2, 2017

Aaa here is a problem. It is correct, I just today published new Beta version that has name "3.24.14 RC". It is probably first time I named it like this for public version.

Have to say that check based on name is quite bad behavior. Naming may be "whatever". I always use same naming system, anyway for some private versions and also rarely for testing version, I add something "extra" to these names.

Now leave it be, but to future I really suggest to check available Locus based on LocusUtils.getActiveVersion(context).getVersionCode() value that is consistent and just increase by 1 with every version (beta, public). Thanks for answer!

@menion menion closed this as completed Aug 2, 2017
arcao added a commit that referenced this issue Aug 3, 2017
Use VersionCode for Locus Map version checking instead to prevent these errors
@arcao
Copy link
Owner

arcao commented Aug 3, 2017

I've published a new version 2.1.5.3 to Google Play, where this should be fixed. The versionCode is now used for minimal Locus Map version checking.

@menion
Copy link
Author

menion commented Aug 3, 2017

Perfect thank You. I wanted to publish today new Beta version because of this, so it is not needed anymore.

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

No branches or pull requests

2 participants