VirtualZer0 / TwitchKeyboard

Windows app for controlling keyboard, mouse and etc from Twitch chat
22 stars 2 forks source link

Error on Channel #6

Open LimpYeti opened 1 year ago

LimpYeti commented 1 year ago

Hello, no matter what I do i get Error when i go to connect my channel. error

LimpYeti commented 1 year ago

Also there is nothing in the logs. I have the latest version of the app and of the runtime. It does not matter what i put on channel it will give me that generic error.

VirtualZer0 commented 1 year ago

Try disabling the firewall and connecting again. If that helps, you'll need to turn the firewall back on and add TwitchKeyboard to the allowed firewall rules.

Here is a description of how you can do this: https://pureinfotech.com/allow-apps-firewall-windows-10/

If that doesn't help, let me know and I'll put a fix in that will record the exact cause of the error in the log file and then we'll try to figure out what exactly is going wrong in your case.

LimpYeti commented 1 year ago

I turned off the firewall with no success. I have allowed the app through also with no success.

aaskjer commented 1 year ago

ye same issue. doesn't work at all, added firewall exemptions but still gives me error

VirtualZer0 commented 1 year ago

TwitchKeyboard.x64.errlog-enabled.zip

Try this version. If there is an error connecting to the chat, you will see a file connectionError.txt with a detailed description of the problem. Send its contents here so that I have a chance to find the problem.

aaskjer commented 1 year ago

crashlog says this:

System.Windows.Markup.XamlParseException: The invocation of the constructor on type 'TwitchKeyboard.Windows.MainWindow' that matches the specified binding constraints threw an exception. ---> System.Net.HttpListenerException (183): Failed to listen on prefix 'http://localhost:51473/' because it conflicts with an existing registration on the machine. at System.Net.HttpListener.AddPrefixCore(String registeredPrefix) at System.Net.HttpListener.AddAllPrefixes() at System.Net.HttpListener.Start() at TwitchKeyboard.Classes.Services.NotificationService.Start() at TwitchKeyboard.Windows.MainWindow..ctor() at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions) --- End of inner exception stack trace --- at System.Windows.Markup.XamlReader.RewrapException(Exception e, IXamlLineInfo lineInfo, Uri baseUri) at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri) at System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri) at System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream) at System.Windows.Application.LoadBamlStreamWithSyncInfo(Stream stream, ParserContext pc) at System.Windows.Application.LoadComponent(Uri resourceLocator, Boolean bSkipJournaledProperties) at System.Windows.Application.DoStartup() at System.Windows.Application.<.ctor>b__1_0(Object unused) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

LimpYeti commented 1 year ago

Tried your new version with no changes. I dont even get a connectionerror.txt

VirtualZer0 commented 1 year ago

Yeah, it looks like I didn't cover every possible case. This version should help to find the error. @aaskjer, this error is not related to connection error, try this version as well.

TwitchKeyboard.x64.errlog-enabled.zip

aaskjer commented 1 year ago

‌‌image This shows up if i try to run it and it is installed @VirtualZer0 ​‌‌‌‌​‌​​‌‌‌‌​‌‌‌‌​‌​​‌​‌​​​​​‌‌​‌‌​‌​‌‌‌​​​‌​​‌‌‌​​​​‌​​​​​‌

VirtualZer0 commented 1 year ago

But this is literally the same program that I uploaded earlier, the changes in it had nothing to do with the platform version.

VirtualZer0 commented 1 year ago

Make sure that you have exactly .NET 6 and exactly the Desktop Runtime version.

aaskjer commented 1 year ago

i didn't changed anything. that's the net version i have image

[edit] @VirtualZer0 i added "TwitchKeyboard.runtimeconfig.json" from your release files and it startet but still shows an error

Errorlog: Join error: Cannot deserialize the current JSON object (e.g. {"name":"value"}) into type 'Classes.APIModels.TwitchGQL.RewardsRoot[]' because the type requires a JSON array (e.g. [1,2,3]) to deserialize correctly. To fix this error either change the JSON to a JSON array (e.g. [1,2,3]) or change the deserialized type so that it is a normal .NET type (e.g. not a primitive type like integer, not a collection type like an array or List) that can be deserialized from a JSON object. JsonObjectAttribute can also be added to the type to force it to deserialize from a JSON object. Path 'error', line 1, position 9. Join error: Cannot deserialize the current JSON object (e.g. {"name":"value"}) into type 'Classes.APIModels.TwitchGQL.RewardsRoot[]' because the type requires a JSON array (e.g. [1,2,3]) to deserialize correctly. To fix this error either change the JSON to a JSON array (e.g. [1,2,3]) or change the deserialized type so that it is a normal .NET type (e.g. not a primitive type like integer, not a collection type like an array or List) that can be deserialized from a JSON object. JsonObjectAttribute can also be added to the type to force it to deserialize from a JSON object. Path 'error', line 1, position 9.

LimpYeti commented 1 year ago

yeah didnt run for me untill i added the twitchkeyboard.runtimeconfi.json as well this time i did get a connectionerror.txt and this is what it had.

Join error: Cannot deserialize the current JSON object (e.g. {"name":"value"}) into type 'Classes.APIModels.TwitchGQL.RewardsRoot[]' because the type requires a JSON array (e.g. [1,2,3]) to deserialize correctly. To fix this error either change the JSON to a JSON array (e.g. [1,2,3]) or change the deserialized type so that it is a normal .NET type (e.g. not a primitive type like integer, not a collection type like an array or List) that can be deserialized from a JSON object. JsonObjectAttribute can also be added to the type to force it to deserialize from a JSON object. Path 'error', line 1, position 9.

VirtualZer0 commented 1 year ago

Okay, I understand the problem. Most likely Twitch changed the API. Tomorrow I will release a new version that fixes this and a couple of other bugs.

VirtualZer0 commented 1 year ago

I tried to connect to your channel, but could not find an error, everything connects steadily and the list of channel rewards is successfully loaded. Maybe it's your location or something else that is causing the Twitch API to return a different format response. Try this build, it will add a Twitch response dump to the text file.

TwitchKeyboard.x64.errlog-enabled.zip

aaskjer commented 1 year ago

I tried to connect to your channel, but could not find an error, everything connects steadily and the list of channel rewards is successfully loaded. Maybe it's your location or something else that is causing the Twitch API to return a different format response. Try this build, it will add a Twitch response dump to the text file.

TwitchKeyboard.x64.errlog-enabled.zip

Found out the last non-standalone release of yours worked fine. i don't know why but it connects without any issues. Some error shows up sometimes at disconnecting it from my channel but after a restart it worked like before. It's only the standalone causing errors like your last linked version still does image

Errorlog:

Join error: Cannot deserialize the current JSON object (e.g. {"name":"value"}) into type 'Classes.APIModels.TwitchGQL.RewardsRoot[]' because the type requires a JSON array (e.g. [1,2,3]) to deserialize correctly. To fix this error either change the JSON to a JSON array (e.g. [1,2,3]) or change the deserialized type so that it is a normal .NET type (e.g. not a primitive type like integer, not a collection type like an array or List) that can be deserialized from a JSON object. JsonObjectAttribute can also be added to the type to force it to deserialize from a JSON object. Path 'error', line 1, position 9. Response: {"error":"Bad Request","status":400,"message":"invalid request body format"}

LimpYeti commented 1 year ago

This is the error i get. For context i am in NA

Join error: Cannot deserialize the current JSON object (e.g. {"name":"value"}) into type 'Classes.APIModels.TwitchGQL.RewardsRoot[]' because the type requires a JSON array (e.g. [1,2,3]) to deserialize correctly. To fix this error either change the JSON to a JSON array (e.g. [1,2,3]) or change the deserialized type so that it is a normal .NET type (e.g. not a primitive type like integer, not a collection type like an array or List) that can be deserialized from a JSON object. JsonObjectAttribute can also be added to the type to force it to deserialize from a JSON object. Path 'error', line 1, position 9. Response: {"error":"Bad Request","status":400,"message":"invalid request body format"}

VirtualZer0 commented 1 year ago

@LimpYeti this is not good news, considering that some people's connection to Twitch is still working fine. Finding the problem may take a while, but I'll try to help you. Around today or tomorrow (not sure about your time zone) I'll recheck the Twitch API again and release a new full version of the app and see if that fixes your problem.

VirtualZer0 commented 1 year ago

Twitch's API may have really changed, but they're making these changes gradually by layers of users, so for now the app works for some people.

LimpYeti commented 1 year ago

let me know if there is anything i can do to help. If you got a paypal or something ill float some cash your way for your hard work. if it helps at all i used a VPN and tried while connected to germany, UK, and Spain with no luck.

VirtualZer0 commented 1 year ago

@LimpYeti can you DM me on Discord? My nickname is VirtualZer0#1799. I think I'll be able to answer you promptly there. You need to make a test request to the Twitch API from your browser to see the response. My time zone is GMT+3, you can try writing any time I'm online.

94HanA commented 1 year ago

image image

I have exactly same problem. I send a friend request to you on discord, could you help me?

VirtualZer0 commented 1 year ago

For anyone with a similar problem, there is a temporary version available at this link. I want to add more functionality in the next full update, so it's a bit delayed.

https://vz0.dev/storage/Expx64v2.zip

marksman1907 commented 1 year ago

I am experiencing the same error. The download link provided seems to be broken. Is there a possibility that it can be fixed?

VirtualZer0 commented 1 year ago

I am experiencing the same error. The download link provided seems to be broken. Is there a possibility that it can be fixed?

Yes, I fixed the link, try downloading again

VirtualZer0 commented 1 year ago

The full update will be this fall, I've had some personal stuff going on but will be back to work soon enough