the-via / releases

GNU General Public License v3.0
2.06k stars 223 forks source link

TypeError occurred when I try to load my keyboard definition. #243

Closed kndol closed 1 year ago

kndol commented 1 year ago

I use Keychron K8 Pro. Previously, VIA worked well, but running the program today is causing problems. I attempted to load a keyboard definition provided by the vendor that had worked previously, but encountered an error today:

TypeError: Cannot read properties of undefined (reading 'Split')
wilba commented 1 year ago

Sounds like the keyboard definition is invalid according to the stricter validation that just went into VIA. All keyboard definitions in the Github repo pass validation, some after fixing mistakes. Since some Keychron keyboard definitions are not in the repo, we can't fix the mistakes.

See https://github.com/the-via/app/issues/91

jg314 commented 1 year ago

I also wasn't able to get the K8 Pro to work with VIA on Windows 11. I'm new to VIA, but tried toggling on Use V2 definitions (deprecated) and uploading the Keychron provided JSON file. I get the same error:

TypeError: Cannot read properties of undefined (reading 'split')

Hopefully Keychron releases a fix for this issue soon.

Flow1392 commented 1 year ago

Hi all, i've got an ISO K8 Pro since few days. It worked well with VIA software and JSON file from Keychron website. I have been able to edit some function keys and/or to add macros. But I've retried few minutes ago, does not work anymore. i've got the same error message ... very strange. Something has been released at VIA side which is no more compatible with previous JSON format ? I really hopes a solution will be found soon

karkianish commented 1 year ago

same issue in my case as well for K8 pro. I tried using the via app 2.1.0 in both mac and windows. Is there a way to rollback to previous versions?

AeyonAhmad commented 1 year ago

Same issue for me as well. I was trying to mess with their json file to see if there was some obvious issue but doesn't seem like it.

Was anyone able to figure out where exactly the issue was in their config or is there something up with their firmware?

joihn commented 1 year ago

apparently the desktop app on linux just load content from this url https://usevia.app/#/test, which probably has been recently updated, thus breaking the K8 pro json file. It's frustrating not to be able to manually rollback, I wish this app worked fully offline for a more granular control over it's versionning.

kndol commented 1 year ago

Previously, the JSON file was working correctly, but no longer lately.

Flow1392 commented 1 year ago

Hello, Someone has proposed me a solution on the Facebook group of Keychron users which was : « You just need to remove all the "a" in the json file and import again. » I confirm it works and now I can customise again my keyboard !

karkianish commented 1 year ago

@Flow1392 - Thank-you, that worked! I had to remove the "a" from two places.

kndol commented 1 year ago

Hello, Someone has proposed me a solution on the Facebook group of Keychron users which was : « You just need to remove all the "a" in the json file and import again. » I confirm it works and now I can customise again my keyboard !

Thank you for the solution!

jg314 commented 1 year ago

After talking with the Keychron support team, they've confirmed that they fixed the error we were seeing. You can now download the working JSON files at https://www.keychron.com/products/keychron-k8-pro-qmk-via-wireless-mechanical-keyboard. I tested the RGB version and it worked perfectly.

jmd-au commented 1 year ago

Just commenting to follow and get updates - as I'm getting a slightly different error when trying to import the file into VIA on a Mac. "Object: should NOT have additional properties". If anyone has seen this error before - i'd be interested to know if you've found a fix.

wilba commented 1 year ago

Can you link to the file please?

YodaLightsabr commented 1 year ago

Just commenting to follow and get updates - as I'm getting a slightly different error when trying to import the file into VIA on a Mac. "Object: should NOT have additional properties". If anyone has seen this error before - i'd be interested to know if you've found a fix.

@jmac-digital I had that error message when I tried it. Redownloading and using V2 definitions fixed it for me.

Can you link to the file please?

@wilba For the K8, here are the current white and RGB files.

wilba commented 1 year ago

This works when using "Use V2 definitions"

nek0pi commented 1 year ago

Same problem here, using Libra mini 40% keyboard. Trying to load the V2 definition, worked previously and now I only see these errors here: image

I imagine this could be due to some change on the structure of the json expected or new stricter json parser in use. Help would be highly appreciated!

For SEO: "Should not have additional properties", "Libra Mini" UPD: So apparently additional keymap layout and fields "vendorIdBk" ,"productIdBk" should now go for via to work

wilba commented 1 year ago

upload the file that doesn't work

DjordjeMancic97 commented 1 year ago

@wilba Here is JSON for Keychron Q1 Version 2, it throws same error as posted by @nek0pi Github does not allow sending json files as attachment so I posted it here https://pastebin.com/E9iYCULm

wilba commented 1 year ago

This is a V3 definition, so turn off "Use V2 definitions (deprecated)" when loading

DjordjeMancic97 commented 1 year ago

This is a V3 definition, so turn off "Use V2 definitions (deprecated)" when loading

In that case there is no errors, however nothing happens. Its searching for devices indefinitely... Could it be that json config is faulty? Should I contact keychron?

ykolloch commented 1 year ago

@DjordjeMancic97 i got the same behavior. Do u have any update?

DjordjeMancic97 commented 1 year ago

@DjordjeMancic97 i got the same behavior. Do u have any update?

Nothing.. will write to keychron

jim3108 commented 1 year ago

I found that under the customKeycodes array there was one which had the property 'shortName' listed as "shortName in macOS" instead of just "shortName" where "in macOS" was supposed to be at the end of the 'title' property.