Skip to content

Conversation

@jermy-c
Copy link
Collaborator

@jermy-c jermy-c commented Sep 25, 2025

  • Run Node.js based on native App lifecycle
  • Remove Capacitor-nodejs dependency
  • Capacitor Bridge is not used anymore since Node.js runs a local server

@benbucksch
Copy link
Collaborator

benbucksch commented Sep 25, 2025

I built it on github CI and installed it on a real Android device (where Mustang Android from master is already running well), and it's crashing on startup.

@jermy-c
Copy link
Collaborator Author

jermy-c commented Sep 25, 2025

Sorry, I haven't written the code to download the libnode to the project. And there's also a linking error I'm seeing whenever the libnode is missing you have to open Android Studio to relink it.

Also this got broken again since 57843e6 because I was trying to reuse the V8 instance so when the app pauses we can stop node but not reinitialize V8.

@jermy-c
Copy link
Collaborator Author

jermy-c commented Sep 29, 2025

The functions to start and stop Node.js work now but both are too slow.

When the startup is too slow, it causes the frontend to throw an error stating that the backend is not present.

When stopping Node.js is too slow, it causes the app to crash because the old Node.js instance is still present. But this only happens when tap the back button to exit and quickly open the app again.

@benbucksch benbucksch force-pushed the jeremy/android-nodejs-lifecycle branch from 62d98d2 to fad20fc Compare October 12, 2025 17:02
@benbucksch
Copy link
Collaborator

I've rebased to master.

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.

Mobile: Manage the backend according to native app lifecyle

3 participants