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

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

Closed
kndol opened this issue Feb 4, 2023 · 23 comments
Closed

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

kndol opened this issue Feb 4, 2023 · 23 comments

Comments

@kndol
Copy link

kndol commented Feb 4, 2023

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
Copy link

wilba commented Feb 4, 2023

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 the-via/app#91

@jg314
Copy link

jg314 commented Feb 4, 2023

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
Copy link

Flow1392 commented Feb 4, 2023

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
Copy link

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
Copy link

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
Copy link

joihn commented Feb 5, 2023

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
Copy link
Author

kndol commented Feb 5, 2023

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

@Flow1392
Copy link

Flow1392 commented Feb 5, 2023

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
Copy link

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

@kndol
Copy link
Author

kndol commented Feb 6, 2023

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
Copy link

jg314 commented Feb 12, 2023

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
Copy link

jmd-au commented Feb 16, 2023

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
Copy link

wilba commented Feb 16, 2023

Can you link to the file please?

@YodaLightsabr
Copy link

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
Copy link

wilba commented Feb 17, 2023

This works when using "Use V2 definitions"

@wilba wilba closed this as completed Feb 17, 2023
@nek0pi
Copy link

nek0pi commented Feb 25, 2023

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
Copy link

wilba commented Feb 25, 2023

upload the file that doesn't work

@DjordjeMancic97
Copy link

@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
Copy link

wilba commented Mar 1, 2023

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

@DjordjeMancic97
Copy link

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
Copy link

ykolloch commented Mar 6, 2023

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

@DjordjeMancic97
Copy link

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

Nothing.. will write to keychron

@jim3108
Copy link

jim3108 commented Jul 6, 2023

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.

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

No branches or pull requests