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

Unandled promse rejection: Error: Unable to require module os on mobile.. Promise: [object Promise]." #2

Open
nowayhaze opened this issue Jan 18, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@nowayhaze
Copy link

Environment

Joplin version: prerelease-5
Platform: Android on Samsung Tab S7 Plus
OS specifics: Android 13

Steps to reproduce

  1. Load "Freehand Drawing" plugin
  2. Plugin fails to load

Describe what you expected to happen

I get an error when loading io.github.personalizeerefrigerator.js-draw PluginRunner: "Plugin io.github.personalizeerefrigerator.js-draw: Unandled promse rejection: Error: Unable to require module os on mobil.. Promise: [object Promise]."
I tried another plugin (ABC Sheet Music) and it does work, but the Freehand Drawing one fails to load.

@nowayhaze nowayhaze added the bug Something isn't working label Jan 18, 2024
@personalizedrefrigerator
Copy link
Owner

Thank you for letting me know!

The Freehand Drawing plugin uses temporary files (through fs-extra) to store and update drawings before sending them to Joplin. For now, there isn't a file system API available to mobile plugins.

Here are two possible ways of fixing this:

  • Mock the fs-extra module using the mobile file system API internally
    • Being completely compatible with fs or fs-extra could be difficult
  • Have Joplin provide its own file system API

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants