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

cannot launch on macOS Monterey #1019

Closed
dabing1022 opened this issue Jun 9, 2021 · 3 comments · Fixed by #1028
Closed

cannot launch on macOS Monterey #1019

dabing1022 opened this issue Jun 9, 2021 · 3 comments · Fixed by #1028

Comments

@dabing1022
Copy link

macOS version:: macOS Monterey 12.0 beta
Kap version:: 3.3.2

cannot launch on monterey 12.0 beta, an error image below:

image

Uncaught Exception:
TypeError: undefined is not iterable (cannot read property Symbol(Symbol.iterator))
at macosRelease (/Applications/Kap.app/Contents/Resources/app.asar/node_modules/macos-release/index.js:26:26)
at Object.<anonymous> (/Applications/Kap.app/Contents/Resources/app.asar/main/utils/errors.js:54:17)
at Module._compile (internal/modules/cjs/loader.js:968:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:986:10)
at Module.load (internal/modules/cjs/loader.js:816:32)
at Module._load (internal/modules/cjs/loader.js:728:14)
at Module._load (electron/js2c/asar.js:717:26)
at Function.Module._load (electron/js2c/asar.js:717:26)
at Module.require (internal/modules/cjs/loader.js:853:19)
at require (internal/modules/cjs/helpers.js:74:18)
@dabing1022
Copy link
Author

dabing1022 commented Jun 9, 2021

OK. I digged the source code

const nameMap = new Map([
	[20, ['Big Sur', '11']],
	[19, ['Catalina', '10.15']],
	[18, ['Mojave', '10.14']],
	[17, ['High Sierra', '10.13']],
	[16, ['Sierra', '10.12']],
	[15, ['El Capitan', '10.11']],
	[14, ['Yosemite', '10.10']],
	[13, ['Mavericks', '10.9']],
	[12, ['Mountain Lion', '10.8']],
	[11, ['Lion', '10.7']],
	[10, ['Snow Leopard', '10.6']],
	[9, ['Leopard', '10.5']],
	[8, ['Tiger', '10.4']],
	[7, ['Panther', '10.3']],
	[6, ['Jaguar', '10.2']],
	[5, ['Puma', '10.1']]
]);

const macosRelease = release => {
	release = Number((release || os.release()).split('.')[0]);

	const [name, version] = nameMap.get(release);

	return {
		name,
		version
	};
};

os.release() got 21 on Monterey system, nameMap doesn't contains 21, so nameMap should add [21, ['Monterey', '12']]

@dabing1022
Copy link
Author

dabing1022 commented Jun 9, 2021

Maybe we should upgrade node_module: macos-release to 2.5.0

Here is the support for Monterey:

sindresorhus/macos-release@d4f2afe

@Jokero
Copy link

Jokero commented Jan 10, 2022

This is what I get when trying to open Kap downloaded from site on Monterey 12.0.1 (21A559):
image (17)

Version from brew works.

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

Successfully merging a pull request may close this issue.

2 participants