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

Error: String `` is not a PID #10

Closed
jingchan opened this issue Sep 27, 2022 · 2 comments · Fixed by #33
Closed

Error: String `` is not a PID #10

jingchan opened this issue Sep 27, 2022 · 2 comments · Fixed by #33

Comments

@jingchan
Copy link

Verification succesful
Performing Incremental Install
Serving...
Unknown command: install-incremental
Performing Streamed Install
Success
Starting: Intent { act=android.intent.action.MAIN cmp=rust.openxr_test/android.app.NativeActivity }
Status: ok
LaunchState: COLD
Activity: com.oculus.shellenv/.ShellEnvActivity
TotalTime: 23
WaitTime: 24
Complete
Error: String `` is not a PID

Caused by:
    cannot parse integer from empty string

cargo apk run succeeds sometimes, but I run into this error frequently (>50% of the time). Repeatedly running the command will eventually lead to success. Appears to be a race condition where apk.start is called before the system is ready to start the app and return a PID, leading to a failure on this line: https://github.com/rust-windowing/android-ndk-rs/blob/master/cargo-apk/src/apk.rs#L251

@dvc94ch dvc94ch transferred this issue from rust-mobile/ndk Dec 22, 2022
@JohnScience
Copy link

I often faced this issue too and it's annoying.

@MarijnS95
Copy link
Member

Ported the fix in #33.

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