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

RSDK-8096 fix module-in-process with tarball #49

Merged
merged 1 commit into from
Jul 9, 2024

Conversation

abe-winter
Copy link
Member

What changed

  • make JAR_PATH an abs path in the module-in-process intent

Why

Startup hangs without this.

Testing

For now, manual tests:

Before

logcat would show:

W  ClassLoader referenced unknown path: ./module.jar
E  error running thread for com.viam.sdk.android.examples.module.MyModuleInProcess
  java.lang.ClassNotFoundException: com.viam.sdk.android.module.fake.FakeContext
    at java.lang.Class.classForName(Native Method)
    at java.lang.Class.forName(Class.java:454)
    at com.viam.rdk.fgservice.ModuleStartReceiver$ModuleThread.run(RDKLaunch.kt:168)
  Caused by: java.lang.ClassNotFoundException: Didn't find class "com.viam.sdk.android.module.fake.FakeContext" on path: DexPathList[[],nativeLibraryDirectories=[./module.jar!/lib/x86_64, ./module.jar!/lib/x86, /system/lib64, /system/product/lib64, /system/lib64, /system/product/lib64]]
...
    at com.viam.rdk.fgservice.ModuleStartReceiver$ModuleThread.run(RDKLaunch.kt:168)

and RDK logs showed Waiting for module to complete startup and registration forever:

7/2/2024, 5:34:10 PM warn robot_server.modmanager utils/ticker.go:22 Waiting for module to complete startup and registration module local-module-1
7/2/2024, 5:34:02 PM warn robot_server.modmanager utils/ticker.go:22 Waiting for module to complete startup and registration module local-module-1
7/2/2024, 5:34:00 PM info robot_server.modmanager.process.local-module-1_/data/user/0/com.viam.rdk.fgservice/cache/.viam/packages-local/data/module/synthetic-local-module-1-0_0_0/mod.sh.StdOut pexec/managed_process.go:282 \_ Broadcast completed: result=0 

After

Module successfully added

7/2/2024, 5:39:00 PM info robot_server.modmanager modmanager/manager.go:342 Module successfully added module local-module-1
7/2/2024, 5:39:00 PM info robot_server.modmanager modmanager/manager.go:1160 Registering component API and model from module module local-module-1 API rdk:component:generic model viam:generic:mygeneric
7/2/2024, 5:38:57 PM info robot_server.modmanager modmanager/manager.go:998 Waiting for module to respond to ready request module local-module-1
7/2/2024, 5:38:57 PM warn robot_server.modmanager utils/ticker.go:22 Waiting for module to complete startup and registration module local-module-1
7/2/2024, 5:38:56 PM info robot_server.modmanager.process.local-module-1_/data/user/0/com.viam.rdk.fgservice/cache/.viam/packages-local/data/module/synthetic-local-module-1-0_0_0/mod.sh.StdOut pexec/managed_process.go:282 \_ Broadcast completed: result=0 

@abe-winter abe-winter requested a review from a team as a code owner July 2, 2024 21:46
@abe-winter abe-winter merged commit 1034140 into main Jul 9, 2024
3 checks passed
@abe-winter abe-winter deleted the fix-module-in-process branch July 9, 2024 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants