twesterapp / twester

Twitch channel points without watching Twitch.
67 stars 1 forks source link

Crashing on launch and also not able to login #4

Closed rodgc closed 3 years ago

rodgc commented 3 years ago

Prerequisites

Issue

Application crash after some time of using it

image

Trying to reload App with the button or closing and reopening it, do not fix the issue

ceoshikhar commented 3 years ago

@rodgc hey!

Sorry about the app crashing. Can you please confirm that app is crashing even after you entirely close it and open it again?

rodgc commented 3 years ago

@ceoshikhar - Stil crashing, I have uninstalled it and re-installed it, and still have the issue

ceoshikhar commented 3 years ago

@rodgc Can you please tell me what was happening when this happened? I am really sorry that I haven't implemented a log report feature when the app crashes. So I can't look at what exactly went wrong. I think the next first thing I should be adding to Twester, should be a crash report feature.

rodgc commented 3 years ago

@ceoshikhar - It was running fine for like 1 hr then it simply crash, I have it on the background running, so didn't see if there was an error o somehitng.

ceoshikhar commented 3 years ago

@rodgc The app isn't working even after re-installation. My best guess would be that something went wrong with data and that wrong data got saved to the app's local storage. Can you delete the installation directory and re-install. Because normal uninstall and reinstall keeps the old local storage data.

rodgc commented 3 years ago

@ceoshikhar - I have already deleted all files related to the application when uninstalling it, still the same issue

SuperQuentin commented 3 years ago

Same here

ceoshikhar commented 3 years ago

@rodgc I can't think of any reason how the app could continue to crash even though it was working fine before. The only reason I could imagine was the local storage data being wrong. I am sorry but I can't think why is it crashing even after reinstalling. :( You are 100% sure that anything related to the app was removed?

ceoshikhar commented 3 years ago

Same here

On macOS ? Was running fine and then crashed and won't run even after re-install?

rodgc commented 3 years ago

@ceoshikhar - Yeah, I also use App Cleaner to ensure everything is deleted

SuperQuentin commented 3 years ago

No, I'm on windows 10 and I try to reinstall it I encounter an issue after trying to add a new streamer the app doesn't seem to take in consideration my action and just after it just doesn't want to work anymore

ceoshikhar commented 3 years ago

@rodgc @SuperQuentin I don't have an access to mac. I generally light tested it on my VM. What I can do is run the app in development and production versions on macOS VM and then hopefully it will crash and I will know what's wrong.

ceoshikhar commented 3 years ago

No, I'm on windows 10 and I try to reinstall it I encounter an issue after trying to add a new streamer the app doesn't seem to take in consideration my action and just after it just doesn't want to work anymore

Please make sure you delete the installation directory. Even after uninstall or remove program on Windows 10, the local storage data will still be there. I am saying this because I have logged in to Twester and then uninstalled and reinstalled the app and my account's data like streamers list etc is still preserved.

SuperQuentin commented 3 years ago

i remove all file at the folder C:\Users\username\AppData\Local\Programs\twester\ where it's install by default but there seem to be other folder and i can't find it. Have you an idea where data can be store ?

SuperQuentin commented 3 years ago

i remove all file at the folder C:\Users\username\AppData\Local\Programs\twester\ where it's install by default but there seem to be other folder and i can't find it. Have you an idea where data can be store ?

Found it at C:\Users\username\AppData\Roaming\Twester

ceoshikhar commented 3 years ago

i remove all file at the folder C:\Users\username\AppData\Local\Programs\twester\ where it's install by default but there seem to be other folder and i can't find it. Have you an idea where data can be store ?

Found it at C:\Users\username\AppData\Roaming\Twester

Please try to delete that and re-install the app and does it still crash or not?

Also, what error does it show for you on crash screen?

SuperQuentin commented 3 years ago

i remove all file at the folder C:\Users\username\AppData\Local\Programs\twester\ where it's install by default but there seem to be other folder and i can't find it. Have you an idea where data can be store ?

Found it at C:\Users\username\AppData\Roaming\Twester

Please try to delete that and re-install the app and does it still crash or not?

Also, what error does it show for you on crash screen?

Now it's working it ask my credentials but i kind of mistype my auth password and now i have captcha error

ceoshikhar commented 3 years ago

I have mentioned about the Captcha Required error when the user fails the login attempt. Did you read it? Hopefully that will help.

Also, do you remember the crash error message? It would be really helpful.

ceoshikhar commented 3 years ago

@rodgc as you can see @SuperQuentin was facing the same app crashing error after re-install and it was fixed for @SuperQuentin by manually deleting the data files. I will try to figure out where they are installed for macOS. Removing them should solve the issue for you too.

SuperQuentin commented 3 years ago

That was the same as on the screenshot

For the captcha error i reinstall the app and i was able to login again put the second factor auth doesn't seem to work, i enter the code one time and nothing happen and i try to do it another time but i have the error message below image

rodgc commented 3 years ago

That was the same as on the screenshot

For the captcha error i reinstall the app and i was able to login again put the second factor auth doesn't seem to work, i enter the code one time and nothing happen and i try to do it another time but i have the error message below image

Has the same issue now

SuperQuentin commented 3 years ago

yay i will try to clone the project and debug it

ceoshikhar commented 3 years ago

That was the same as on the screenshot For the captcha error i reinstall the app and i was able to login again put the second factor auth doesn't seem to work, i enter the code one time and nothing happen and i try to do it another time but i have the error message below image

Has the same issue now

wait! your app crashing after re-installation issue is fixed?

ceoshikhar commented 3 years ago

yay i will try to clone the project and debug it

Thank you so much!

SuperQuentin commented 3 years ago

image i can't do anything now i will check on another time

SuperQuentin commented 3 years ago

image image

same error on the auth page now

ceoshikhar commented 3 years ago

image image

same error on the auth page now

This is really helpful. It's pretty late for me right now. I will check it out tomorrow. I am pretty sure all I have to do is add a ? to optionally chain wherever I am reading from data. Once again, thank you.

PS - If you want, you can fix it and create a PR for this data undefined error on auth page. The problem is in src/renderer/pages/AuthPage.tsx and there should be 3 places where data.something is being checked on server response. Just have to add an optional flag to it.

Example

from

const something = data.something;

to

const something = data?.something;

EDIT - IGNORE THE ABOVE. I WAS WRONG.

ceoshikhar commented 3 years ago

@rodgc @SuperQuentin I have found the issue. Apparently one of the Twitch API end points have been changed and that change is a breaking change. I am looking into it.

The Twitch API that was being used to fetch channel info is returning 404 instead of the data.

image

Edit: I just checked the Twitch's official public docs and this API should return details of the Twitch channel. I think something is wrong with Twitch API. Let's wait for sometime and recheck the API.

ceoshikhar commented 3 years ago

The API being used is https://dev.twitch.tv/docs/api/reference#get-users and apparently its not working as expected.

khl3o commented 3 years ago

same problem here with macOS

ceoshikhar commented 3 years ago

Looks like the client-id being used right now to interact with Twitch API is not working. The App is crashing because the data in one of the main API calls is returning 404 instead of the expected data.

ceoshikhar commented 3 years ago

@rodgc @SuperQuentin @khl3o the PR to fix these crashing issues is in progress. The problem was that Twitch's Helix API had breaking changes. Twester was using those APIs to fetch profile picture URLs and channel info (showed on Streamers tab). The same API was used on the final step of login flow.

So Twester was crashing for users who were logged in and login flow was failing.

Note: macOS users will have to manually download the new release version with the fix. Auto-Update should work for Windows and Linux users, you just have to close and reopen Twester for auto update to start. If it doesn't update from v1.0.0 then manually update.

ceoshikhar commented 3 years ago

@rodgc @SuperQuentin @khl3o

Twester v1.0.1 is released which fixed the issues causing Twester to crash ( for logged in user ) or user was not able to login ( login flow failed at final step ).

Twester auto updated for me to v1.0.1. Although I would still get the app crashed screen but I have to wait for sometime while the download and installation happens in the background. Once that's completed, you will get a Windows Notification saying Twester v1.0.1 is installed, restart to use it.

Please let me know if you are still facing this issue or is it resolved.

khl3o commented 3 years ago

worked for me, thanks a lot

rodgc commented 3 years ago

@ceoshikhar - Thx working now

ceoshikhar commented 3 years ago

Well looks like it's fixed. I will be closing this issue now. Thank you everyone for helping make Twester better. ♥