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

HyperPlay fails if the game default channel is not expected #767

Open
flavioislima opened this issue Feb 27, 2024 · 0 comments
Open

HyperPlay fails if the game default channel is not expected #767

flavioislima opened this issue Feb 27, 2024 · 0 comments
Labels
Severity: 2 - Medium Moderate impact affecting a smaller subset of users or non-critical functionality. Type: Bug Something isn't working

Comments

@flavioislima
Copy link
Contributor

Happened with Coinracer when they uploaded thei build that they used the channel called 'Stage'. Because of that HP was failing to download it with the error:

Error occurred in handler for 'addToDMQueue': TypeError: Cannot read properties of undefined (reading 'release_meta')
    at Module.getInstallInfo$2 [as getInstallInfo] (evalmachine.<anonymous>:1:406493)
    at addToQueue (evalmachine.<anonymous>:1:335780)
    at evalmachine.<anonymous>:1:854044
    at WebContents.<anonymous> (node:electron/js2c/browser_init:2:77976)
    at WebContents.emit (node:events:517:28)
    at WebContents.emit (node:domain:489:12)
    at WebContents.emit (/Applications/HyperPlay.app/Contents/Resources/app.asar/node_modules/@sentry/electron/main/integrations/electron-breadcrumbs.js:119:20)```

Changing here the `channelNameToInstall` from `main` to `Stage` fixed the download:

export const getInstallInfo = async (
appName: string,
platformToInstall: InstallPlatform,
// eslint-disable-next-line @typescript-eslint/no-unused-vars
lang = 'en',
channelNameToInstall = 'Stage'
): Promise<HyperPlayInstallInfo | undefined> => {
const gameInfo = getGamesGameInfo(appName)```

So Ideally Hyperplay should be able to continue the download using the value from the key (in this case Stage) from the JSON instead of failing or if not possible maybe showing a warning or error on the screen.

for more context, this was the JSON part from the API:

		{
			"runner": "hyperplay",
			"app_name": "0x0867d524dd45acfd1d7cfb548bda41574b6339997ed01f9d3ac5284b7cc7fc44",
			"is_installed": false,
			"cloud_save_enabled": false,
			"namespace": "",
			"folder_name": "coinracerreloaded",
			"save_folder": "",
			"canRunOffline": false,
			"install": {},
			"art_square": "https://gateway.valist.io/ipfs/bafybeieohokx4pwy4kphbgdkdpcyaywhzpf6rntjvqh4w36nz2kkx77t34",
			"art_cover": "https://gateway.valist.io/ipfs/bafybeibtsfl67oamgjdmfvtqjvrh54grjpaofoeaaduwousujfc7onqrk4",
			"title": "CoinRacer Reloaded",
			"extra": {
				"about": {
					"description": "Dive into the fast-paced, low-poly racing adventure, with our innovative game featuring multiple modes for every speed enthusiast. Whether you’re conquering tracks solo or challenging friends in multiplayer races, our diverse range of gameplay offers endless thrills. Race to victory, and with every win, earn rewards that enhance your gaming experience in the exhilarating realm of the Coinracer World, where you be the lone maverick that dominates all competition on or off the track or you choose to team up with your friends and create your own racing team to become the ultimate CoinRacer Champion.\n\nEverything from car upgrades to owning your own business is available for players in the CoinRacer open world, all you need to do is start your engine!",
					"shortDescription": "CoinRacer is a low-poly-style blockchain-powered multiplayer racing game"
				},
				"reqs": [
					{
						"title": "CoinRacer Reloaded"
					}
				],
				"storeUrl": "https://store.hyperplay.xyz/game/coinracerreloaded"
			},
			"developer": "Coinracer",
			"is_windows_native": true,
			"channels": {
				"Stage": {
					"channel_id": 140,
					"channel_name": "Stage",
					"release_meta": {
						"name": "beta.202",
						"meta_uri": "https://gateway.valist.io/ipfs/bafkreicux7kpcwkg522vidu3uzwt2anbz7tfajwfe2pcbexvabap5cv7rm",
						"platforms": {
							"darwin_amd64": {
								"name": "Coinracer_Beta.202.zip",
								"executable": "Coinracer.app",
								"installSize": "578094294",
								"downloadSize": "578094294",
								"external_url": "https://gateway.valist.io/ipfs/bafybeiadt2jlrf7kofae3htanyck2hwszv4kttp7igdiy5xyt43q6ktjxu/darwin_amd64/Coinracer_Beta.202.zip?token=w3T-27NIWzEV8sW4lss0DsWIvyqIdJ1rh2Oz3c7d6GU&expires=1709055380"
							},
							"windows_amd64": {
								"name": "Coinracer_Beta.202.zip",
								"executable": "Coinracer.exe",
								"installSize": "563523888",
								"downloadSize": "563523888",
								"external_url": "https://gateway.valist.io/ipfs/bafybeiadt2jlrf7kofae3htanyck2hwszv4kttp7igdiy5xyt43q6ktjxu/windows_amd64/Coinracer_Beta.202.zip?token=-E5esnKiSkUg_BICEW1lljqXJyioRyDLSgVYAuhlatI&expires=1709055380"
							}
						},
						"project_id": "0x0867d524dd45acfd1d7cfb548bda41574b6339997ed01f9d3ac5284b7cc7fc44",
						"release_id": "0xf0a77c6243003de319280214b3d59f57f4eb18a60b3ea6ac8a5964317080a176",
						"description": "This Release contains both Windows and macOS files.",
						"external_url": "https://gateway.valist.io/ipfs/bafybeiadt2jlrf7kofae3htanyck2hwszv4kttp7igdiy5xyt43q6ktjxu",
						"release_name": "beta.202"
					},
					"license_config": {
						"id": 57,
						"tokens": false,
						"access_codes": false
					}
				}
			},
			"store_url": "https://store.hyperplay.xyz/game/coinracerreloaded",
			"description": "Dive into the fast-paced, low-poly racing adventure, with our innovative game featuring multiple modes for every speed enthusiast. Whether you’re conquering tracks solo or challenging friends in multiplayer races, our diverse range of gameplay offers endless thrills. Race to victory, and with every win, earn rewards that enhance your gaming experience in the exhilarating realm of the Coinracer World, where you be the lone maverick that dominates all competition on or off the track or you choose to team up with your friends and create your own racing team to become the ultimate CoinRacer Champion.\n\nEverything from car upgrades to owning your own business is available for players in the CoinRacer open world, all you need to do is start your engine!",
			"v": "1",
			"project_name": "coinracerreloaded",
			"web3": {
				"supported": true
			},
			"is_mac_native": true,
			"is_linux_native": false,
			"account_name": "coinracer"
		}
@awantoch awantoch added Type: Bug Something isn't working Severity: 2 - Medium Moderate impact affecting a smaller subset of users or non-critical functionality. labels Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Severity: 2 - Medium Moderate impact affecting a smaller subset of users or non-critical functionality. Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants