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

[Bug]: After update 1.12.5 does not work in the mobile version of obsidian (android) #1033

Closed
antomal opened this issue Aug 1, 2024 · 13 comments · Fixed by #1048
Closed
Labels
beta Included in beta release, https://github.com/st3v3nmw/obsidian-spaced-repetition/discussions/1011 bug Something isn't working

Comments

@antomal
Copy link

antomal commented Aug 1, 2024

Describe the bug

Just updated the plugin to version 1.12.5 and now I can't open the cards and the queue selection window! :-(

To Reproduce

  1. Update plugin version to 1.12.5
  2. Try to open the card list or queue

Expected behavior

I should see a window with lists of cards or a window with tags on pages (queue)

Screenshots

No response

OS of your device

MIUI 13.0.6

Obsidian version

1.6.7 (149)

Plugin version

1.12.5

Installer version

No response

Additional context

No response

Config file

No response

@antomal antomal added the bug Something isn't working label Aug 1, 2024
@ronzulu
Copy link
Collaborator

ronzulu commented Aug 1, 2024

Hi @antomal

We'll need a more comprehensive description of what fails, including screenshots.

It seems fine on my Samsung Android

Cheers
Ronny

2024-08-01 20 58 25

2024-08-01 20 58 39

2024-08-01 20 58 46

2024-08-01 20 58 53

2024-08-01 20 59 01

@antomal
Copy link
Author

antomal commented Aug 1, 2024

I'm happy to help, but I don't know how to describe in more detail and make screenshots of what is not there.

But I'll try. I recorded a video from the screen.
https://static.antomal.com/Screenrecorder-2024-08-01-14-17-27-933.mp4

  1. first I show that the version is 1.12.4 and everything works
  2. I update the plugin to 1.12.5
  3. I try to open window "Review flashcards" - nothing happens
  4. I try to open command "Spaced Repetition: Open a note for review" - nothing...

@ronzulu
Copy link
Collaborator

ronzulu commented Aug 1, 2024

Sorry, I don't have much expertise on an android platform.

If this was on the desktop, I'd suggest opening the chrome developer window (control shift I) and see if there is any error output.

I did a Google search, but couldn't find an easy way to do this on Android. One way that involves connecting the phone to a PC is shown here (but I haven't tried it)
https://help.pushwoosh.com/hc/en-us/articles/360027726731-Android-Chrome-console-logs

@antomal
Copy link
Author

antomal commented Aug 1, 2024

I'm very sorry to hear that. :-(

I tested previous versions, maybe there are ideas and this will help.

1.12.0 — NOT working (only menu Review Flashcards takes a looooong time to open. the queue selection window does not open)
1.12.1 — NOT working (only menu Review Flashcards takes a looooong time to open. the queue selection window does not open)
1.12.2 — NOT working
1.12.3 — working (!!!)
1.12.4 — working (!!!)
1.12.5 — NOT working

I have a smartphone Redmi note 11
Screen resolution — 2400×1080 (aspect ratio — 20:9)

Just in case, I'll leave it here — Android version — 12SKQ1.211103.001

@ronzulu
Copy link
Collaborator

ronzulu commented Aug 2, 2024

Thanks for doing that. If you can do the same thing with the different beta releases, that would also be helpful.

After 1.12.4 there were 4 beta releases that incrementally incorporated the changes that were released as part of 1.12.5. (not precisely, but is a good starting point)

Please try:
https://github.com/ronzulu/obsidian-spaced-repetition/releases/tag/1.13-beta.5
https://github.com/ronzulu/obsidian-spaced-repetition/releases/tag/1.13-beta.6
https://github.com/ronzulu/obsidian-spaced-repetition/releases/tag/1.13-beta.7
https://github.com/ronzulu/obsidian-spaced-repetition/releases/tag/1.13-beta.8

Don't worry that the beta is 1.13 but the mainstream release is 1.12.5

@antomal
Copy link
Author

antomal commented Aug 2, 2024

No problem!

1.13-beta.5 — working
1.13-beta.6 — Command "Open note for review" opens an EMPTY window. "Review flashcards" (Decks) — works well. (see screenshots)
1.13-beta.7 — working
1.13-beta.8 — NOT working (!!!)

I'm glad to help you.

@ronzulu
Copy link
Collaborator

ronzulu commented Aug 4, 2024

That is helpful.

At this stage we don't know if it's a code issue or a rendering issue.

Could you next please try:

main.js/manifest.json styles.css
1.13-beta.7 1.13-beta.8
1.13-beta.8 1.13-beta.7

Hopefully that will give us a clue.

Cheers
Ronny

@antomal
Copy link
Author

antomal commented Aug 4, 2024

I checked!

main.js/manifest.json styles.css ?
1.13-beta.7 1.13-beta.8 working
1.13-beta.8 1.13-beta.7 NOT working

@ronzulu
Copy link
Collaborator

ronzulu commented Aug 6, 2024

Hi @antomal

Could you please try the latest beta release https://github.com/ronzulu/obsidian-spaced-repetition/releases/tag/1.13-beta.12

The bug should still occur, hopefully causing an exception, and now we can capture the exception details.

Use the new log to file setting:
image

Then try one of the operations that fail, and a log file will appear in the vault under folder temp/logs

Cheers
Ronny

@antomal
Copy link
Author

antomal commented Aug 6, 2024

  • Command "Open note for review" opens an EMPTY window (screenshot)
  • Review flashcards" (Decks) — NOT working

log:

[2024-08-06 18:30:33]: 
---
## Obsidian: SpacedRepetition: Branch: master v1.13-beta.12

[2024-08-06 18:30:42]: 
---
## Obsidian: SpacedRepetition: Branch: master v1.13-beta.12

[2024-08-06 18:30:46]: ERROR: sync()
[2024-08-06 18:30:46]: STACK: TypeError: Cannot read properties of undefined (reading 'normalize')
    at isEqualOrSubPath (plugin:obsidian-spaced-repetition:6658:44)
    at eval (plugin:obsidian-spaced-repetition:6981:58)
    at Array.some (<anonymous>)
    at _SettingsUtil.isPathInNoteIgnoreFolder (plugin:obsidian-spaced-repetition:6981:41)
    at OsrAppCore.loadVault (plugin:obsidian-spaced-repetition:10524:26)
    at _SRPlugin.doSync (plugin:obsidian-spaced-repetition:23880:27)
    at _SRPlugin.sync (plugin:obsidian-spaced-repetition:23869:18)
    at eval (plugin:obsidian-spaced-repetition:23674:22)
[2024-08-06 18:30:48]: ERROR: sync()
[2024-08-06 18:30:48]: STACK: TypeError: Cannot read properties of undefined (reading 'normalize')
    at isEqualOrSubPath (plugin:obsidian-spaced-repetition:6658:44)
    at eval (plugin:obsidian-spaced-repetition:6981:58)
    at Array.some (<anonymous>)
    at _SettingsUtil.isPathInNoteIgnoreFolder (plugin:obsidian-spaced-repetition:6981:41)
    at OsrAppCore.loadVault (plugin:obsidian-spaced-repetition:10524:26)
    at _SRPlugin.doSync (plugin:obsidian-spaced-repetition:23880:27)
    at _SRPlugin.sync (plugin:obsidian-spaced-repetition:23869:18)
    at Object.callback (plugin:obsidian-spaced-repetition:23722:22)
    at aY (http://localhost/app.js:1:2045224)
    at t.onChooseItem (http://localhost/app.js:1:2637292)
[2024-08-06 18:31:01]: ERROR: sync()
[2024-08-06 18:31:01]: STACK: TypeError: Cannot read properties of undefined (reading 'normalize')
    at isEqualOrSubPath (plugin:obsidian-spaced-repetition:6658:44)
    at eval (plugin:obsidian-spaced-repetition:6981:58)
    at Array.some (<anonymous>)
    at _SettingsUtil.isPathInNoteIgnoreFolder (plugin:obsidian-spaced-repetition:6981:41)
    at OsrAppCore.loadVault (plugin:obsidian-spaced-repetition:10524:26)
    at _SRPlugin.doSync (plugin:obsidian-spaced-repetition:23880:27)
    at _SRPlugin.sync (plugin:obsidian-spaced-repetition:23869:18)
    at Object.eval [as callback] (plugin:obsidian-spaced-repetition:23658:20)
    at http://localhost/app.js:1:2372501
    at e.handleEvent (http://localhost/app.js:1:1174276)
[2024-08-06 18:31:01]: Unhandled promise rejection: TypeError: Cannot read properties of undefined (reading 'getDeck')
[2024-08-06 18:31:48]: 
---
## Obsidian: SpacedRepetition: Branch: master v1.13-beta.12

[2024-08-06 18:31:51]: ERROR: sync()
[2024-08-06 18:31:51]: STACK: TypeError: Cannot read properties of undefined (reading 'normalize')
    at isEqualOrSubPath (plugin:obsidian-spaced-repetition:6658:44)
    at eval (plugin:obsidian-spaced-repetition:6981:58)
    at Array.some (<anonymous>)
    at _SettingsUtil.isPathInNoteIgnoreFolder (plugin:obsidian-spaced-repetition:6981:41)
    at OsrAppCore.loadVault (plugin:obsidian-spaced-repetition:10524:26)
    at _SRPlugin.doSync (plugin:obsidian-spaced-repetition:23880:27)
    at _SRPlugin.sync (plugin:obsidian-spaced-repetition:23869:18)
    at eval (plugin:obsidian-spaced-repetition:23674:22)

@ronzulu
Copy link
Collaborator

ronzulu commented Aug 7, 2024

Great, now we know why.

[FIX] Folder ignore sorts all folder starting with string #972 introduced a call to the system api normalize, which exists on the Desktop, but not on some (all?) mobile platforms.

@4Source, are you able to update the isEqualOrSubPath code to not depend on the normalize function.

Ideally the project's build process should detect this condition and fail.

@4Source
Copy link
Contributor

4Source commented Aug 12, 2024

@4Source, are you able to update the isEqualOrSubPath code to not depend on the normalize function.

I will take a look at it should be possible

Sry for late response

@ronzulu ronzulu linked a pull request Aug 13, 2024 that will close this issue
@ronzulu ronzulu added the beta Included in beta release, https://github.com/st3v3nmw/obsidian-spaced-repetition/discussions/1011 label Sep 9, 2024
@ronzulu
Copy link
Collaborator

ronzulu commented Sep 9, 2024

This is now part of the latest beta release:
#1011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta Included in beta release, https://github.com/st3v3nmw/obsidian-spaced-repetition/discussions/1011 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants