-
-
Notifications
You must be signed in to change notification settings - Fork 135
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
Java Reflection fail on thread #735
Comments
Hey @nabil-mansouri What are the minimal steps to reproduce the exceptions that you are experiencing? Can you provide a repository with a demo project where the problem can be reproduced reliably every time? And please use the provided Issue template when posting issue and/or pull requests. |
Hi @Pip3r4o of course! I have a demo app in "tests/app": You can launch tests using (it runs on android emulator): npm run test-android The test "should live query" in the following file will failed (you can see the exception on adb logcat only): |
@nabil-mansouri I fetched your project and made a few changes, to be able to build it, but I am unable to test it, as it lacks I went over the code however, and could find all of your tests - it would be great if you isolated the chunk that crashes the application, and provide a simpler demo application, so we may find the problem faster. |
Hi @Pip3r4o thank you for your reply! I made a small app as demo here: I run live queries at stratup (appcomponent.ngOnInit). I tried to play with classloader manually (setting classloader context) but still have exception. I have seen that TnsRuntime have a cachclass. Maybe i will try to set class in cache using reflection i will try to see... But it is a hack lol |
@nabil-mansouri I've tried to reproduce the described scenario using your demo application but on several configurations, all that is happening is that the application freezes on the initial load (right after the splash screen before ngOnInit is fired in app.component.ts) On secondary load the app crashes n createDocument with status 409. At this moment we can not reproduce your case with your application as the app is never hitting Are there additional steps needed to be taken in order to start the app? If so please describe the workflow. |
@nabil-mansouri we haven't heard from you in a while, so I am going to close this issue. Feel free to reopen it if this continues to be a problem for you. |
Hi Guys
WHEN USING ANDROID THREAD, SOME CLASSES ARE NOT FOUND BY CLASSLOADER (tns.Runtime.callJS failed).
platform: android
tns-core-modules 2.5.0 version
Runtime version: 2.5.0 version
My Plugin : 1.0.0 version (https://github.com/nabil-mansouri/nativescript-couchbaselite)
I am trying to create a couchbase plugin that make available all features. But when i am trying to create view , i need to emit keys. This is done in couchbase in a separate thread. When my emit bloc is called, it throws a "ClassnotfoundException" on tns runtime. But when i try to get java.lang.Class.forName("com.couchbase.lite.store.SQLiteViewStore$AbstractMapEmitBlock") on main thread , it works! It seems that runtime is not looking on the same classloader?
Here are my unit tests (npm run test-android):
https://github.com/nabil-mansouri/nativescript-couchbaselite/blob/master/tests/app/tests/couchbase.ts
"should live query" failed
On adb logcat i have this stacktrace:
Edit: proper formatting to help readability
The text was updated successfully, but these errors were encountered: