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]: local storage deserialization error #67

Open
5 tasks done
Jadecraft4 opened this issue Dec 6, 2022 · 11 comments
Open
5 tasks done

[Bug]: local storage deserialization error #67

Jadecraft4 opened this issue Dec 6, 2022 · 11 comments

Comments

@Jadecraft4
Copy link

Guidelines

  • I have encountered this bug in the latest release of FreeTube.
  • I have searched the issue tracker for open and closed issues that are similar to the bug report I want to file, without success.
  • I have searched the documentation for information that matches the description of the bug I want to file, without success.
  • This issue contains only one bug.

Describe the bug

The app doesn't load when you add too many subscriptions.

To reproduce this you can:

  1. Import subscriptions with a lot of subscriptions or
  2. Subscribe to a lot of YouTubers
  3. Then when you close the app and open it again, it stops working and shows a blank screen.

Expected Behavior

I expect the app to load when I have a lot of youtubers, so load with everything and all the saved settings and subscriptions.

Issue Labels

causes crash, content not loading, visual bug

FreeTube Version

v.0.18.0 nightly-77

Operating System Version

Android version 12

Installation Method

.apk

Primary API used

Invidious API

Last Known Working FreeTube Version (If Any)

No response

Additional Information

I tried both APIs with no luck. I think something that might help tackle this issue is what the last person said in FreeTubeApp#2909 (I'm typing this on phone, so I don't want to type that.)

I mean no harm if I've typed or filled anything wrong.

Nightly Build

@Jadecraft4
Copy link
Author

Error 404

I found some errors in the console that might be helpful.

MarmadileManteater added a commit that referenced this issue Jan 23, 2023
- Turn off injecting the webpack bundle into
the index.html in `webpack.cordova.config`
- Add stylesheet import to the index.ejs when IS_CORDOVA == true
- Add onload to `cordova.js` script which loads in the `web.js`
bundle when IS_CORDOVA == true

I believe this is related to #67
MarmadileManteater added a commit that referenced this issue Jan 23, 2023
@MarmadileManteater
Copy link
Owner

MarmadileManteater commented Jan 23, 2023

Looking into this error, it looks like I might have been off-base with my original statement that this is related to an error from de-serializing local storage; however, the good news is that this seems to be related to the race condition I was describing here: #79 (comment). I just pushed up some commits which may resolve this issue. You can try out these changes by downloading the nightly available here: https://github.com/MarmadileManteater/FreeTubeCordova/actions/runs/3990278365

@Jadecraft4
Copy link
Author

Error 403
New Errors

Bad news about the new nightly, it doesn't allow me to import any subscriptions, and I can't watch any videos. It seems a little unstable because it crashes frequently. (And my phone says there's some bug in there but it did not specify.) I hope this helps!

@MarmadileManteater
Copy link
Owner

I have a few questions. What happens when you click the Import subscriptions button? Does it allow you to select a file, but fail to load or does it not let you select a file at all?

As far as watching videos goes, what Invidious instance displays in the General Settings section?

Also, when you say it crashes frequently, can you describe what is happening before the crash during the times you've experienced a crash? I'm trying to understand if there is a pattern.

Also, I'm sorry if I am bombarding you with questions. I am just trying to understand the problem better.

@MarmadileManteater
Copy link
Owner

I just pushed up some changes which might help with the crashes related to watching videos. You can download the nightly with these changes here: https://github.com/MarmadileManteater/FreeTubeCordova/actions/runs/3998526419 (Enabling the Disable notificiation when app in background setting under Cordova Settings may also help with some of the crashes.)

@Jadecraft4
Copy link
Author

Sorry for the late reply. What happens when I click the import subscriptions button is that it shows the files that you can import, but it crashes as soon as I press the button. So press the button, crash, but it shows the screen to import. When I choose something to import, it takes me to my home screen.

Here is the invidious instance:
https://invidious.slipfox.xyz

Describing what happens before crashing, what happened is I would watch a video or import subscriptions. Guess that isn't much help. But I think it just crashes when I interact with an outside source, so the videos, or the things on my phone for import, but it was never when I would click to a different section, or open certain settings, which was in the app.

Hope this helps you understand what's happening, the only better way would be to make a video, but I am unsure if github supports that.

@MarmadileManteater
Copy link
Owner

MarmadileManteater commented Jan 25, 2023

You are 🧊cool with taking your time. I don't want to make you feel rushed. I do this for fun, so I definitely understand not being able to get back to someone immediately.

@RusselNash10121
Copy link

I just pushed up some changes which might help with the crashes related to watching videos. You can download the nightly with these changes here: https://github.com/MarmadileManteater/FreeTubeCordova/actions/runs/3998526419 (Enabling the Disable notificiation when app in background setting under Cordova Settings may also help with some of the crashes.)

Hi, new user here.

LineageOS 20 (Android 13) with microg

FreeTubeCordova 0.18.0.98 from f-droid
136 subscriptions

Trying to import subscriptions from Newpipe and YT both crashed the app, both with changing settings beforehand and without. I tried the nightly you linked to. Disabling that setting in Cordova Settings indeed causes it not to crash anymore, however, importing Newpipe or YT subs simply doesn't work. The little popup notification that it may take some time to import shows up and goes away but nothing happens. I've tried it many times and there isn't any feedback or error message. Except once it did show some Invidious API errors but it almost always just silently fails to import anything.

@RusselNash10121
Copy link

I'm not a dev or coder so forgive me if this is a stupid question but is it possible that this could be caused by the fact that I have one YT subscription in which the name of the channel has unusual characters / symbols in it?

Channel in question:

https://www.youtube.com/@user-fu1jy7jr3z

@Jadecraft4
Copy link
Author

Sorry about that gap of time, schoolwork got the best of me.

I had some things to say about the new nightly. (Although, I am unsure if you have fixed this recently.) I remember when I used it that the videos would load indefinitely. It would try to load, then it would show that image where it was like a broken website. Then it would try again, and do the same. But when I tried it now, it still doesn't load, but now it's like the circle thing.

The subscriptions don't work, but that may be obvious because you only tried to fix the videos.

Something I just found out, when loading the phone into the debug menu, it loads the video. But by itself it cannot. But I might need to test it more.

Error, Just Error
^Video Loaded

Error 202
Error 202 cont
^No Video

It's a little sensitive in when it will load a video, but I was able to get the errors for no video. Now that I think about it, when the video loaded, I had already had the debug menu open, but I opened the debug menu when the video couldn't load the next time. I think that's how that happened.

I hope this helps in any way!

@MarmadileManteater
Copy link
Owner

MarmadileManteater commented Feb 29, 2024

I apologize for letting this issue go dormant for a year. I'm not 100% certain, but the nightly might resolve your issues. It will 100% fix those cors errors, but it might also fix issues related to importing/exporting data or reading the databases from storage.

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

No branches or pull requests

3 participants