[BUG] Android - TypeError: app.vault.adapter.getBasePath is not a function
See original GitHub issueDescribe the bug I’m trying to run quickadd on my Android phone. I can find my macro that I’ve created (and verified that it works on desktop) but when I run it I get the following error:
Uncaught (in promise) TypeError: app.vault.adapter.getBasePath is not a function
at getUserScript (eval at <anonymous> (app.js:1:1), <anonymous>:10399:41)
at MacroChoiceEngine.executeUserScript (eval at <anonymous> (app.js:1:1), <anonymous>:11554:34)
at MacroChoiceEngine.executeCommands (eval at <anonymous> (app.js:1:1), <anonymous>:11533:28)
at MacroChoiceEngine.run (eval at <anonymous> (app.js:1:1), <anonymous>:11526:20)
at ChoiceExecutor.onChooseMacroType (eval at <anonymous> (app.js:1:1), <anonymous>:15792:27)
at async ChoiceExecutor.execute (eval at <anonymous> (app.js:1:1), <anonymous>:15768:17)
at async Object.callback (eval at <anonymous> (app.js:1:1), <anonymous>:15944:21)
getUserScript @ VM515:10399
executeUserScript @ VM515:11554
executeCommands @ VM515:11533
run @ VM515:11526
onChooseMacroType @ VM515:15792
await in onChooseMacroType (async)
LL @ app.js:1
t.onChooseItem @ app.js:1
t.onChooseSuggestion @ app.js:1
t.selectSuggestion @ app.js:1
e.useSelectedItem @ app.js:1
e.onSuggestionClick @ app.js:1
s @ app.js:1
Interestingly I get almost the same error when I try to hit the gear icon for the user script step in my macro.
VM515:10399 Uncaught (in promise) TypeError: app.vault.adapter.getBasePath is not a function
at getUserScript (eval at <anonymous> (app.js:1:1), <anonymous>:10399:41)
at UserScriptCommand.configureScript (eval at <anonymous> (app.js:1:1), <anonymous>:14595:28)
at eval (eval at <anonymous> (app.js:1:1), <anonymous>:224:20)
at Array.forEach (<anonymous>)
at eval (eval at <anonymous> (app.js:1:1), <anonymous>:223:31)
at configureChoice (eval at <anonymous> (app.js:1:1), <anonymous>:13851:3)
at HTMLSpanElement.click_handler (eval at <anonymous> (app.js:1:1), <anonymous>:13854:30)
To Reproduce Steps to reproduce the behavior:
- Open obsidian on and android phone
- Open the command pallet
- Type the name of your quickadd macro
- See error
Expected behavior I expected it to run just like it does on desktop.
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: Windows 10, macOS 11.6.2 (works on both)
Smartphone (please complete the following information):
- Device: Pixel 3a
- OS: Android 12
- Browser: Chrome (latest as of today)
- Obsidian version 1.0.5
Additional context Let me know if there’s anything else I can offer or explain!
Issue Analytics
- State:
- Created 2 years ago
- Comments:15 (4 by maintainers)
Top Results From Across the Web
TypeError: app.get is not a function - Stack Overflow
But when I use it It throws the error TypeError: app.get is not a function When I remove the prototype part it works....
Read more >Why does fs.writeFile not save file? - #22 by joethei - Developers ...
To create and overwrite a file, I just use app.vault.adapter.write . To read it if it exists, app.vault.adapter.read . Not sure ...
Read more >Android apps build failing - Build issue - AppGyver forums
After time more than 7-10 times to create a build, writing the ticket. Unable to build android app. getting this error multiple time...
Read more >base-magento/CHANGELOG.md at 2.4 · artifakt-io ... - GitHub
(by @BorisovskiP); magento/magento2#26982 -- Remove app/functions.php (by ... Accept HTTP header media type" error message was not informative enough ...
Read more >2017-April.txt - Jboss List Archives
The SSO aspect of keycloak is not fulfilled since I have to pass username ... are trying to secure our application using the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thank you!
Found the issue. It’s line 167. I believe it stops working when it attempts to create a buffer.
I also found a working solution: https://stackoverflow.com/a/26514148 Go to the ‘Cross Browser’ solution and use the Base64 object. Instead of creating a new buffer, you should just encode your credentials, e.g:
Hi @Elaws,
I’ll respond in the issue you opened.
getBasePath
is not used in QuickAdd anymore, anywhere, as it doesn’t work on mobile.