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

Release does not run on mac silicon #2

Closed
5 tasks
nickvazz opened this issue Jun 16, 2024 · 16 comments
Closed
5 tasks

Release does not run on mac silicon #2

nickvazz opened this issue Jun 16, 2024 · 16 comments
Labels
bug Something isn't working

Comments

@nickvazz
Copy link

nickvazz commented Jun 16, 2024

Hello! Love the idea this project is providing. Knowing zero typescript, I did not try to build from source and instead just use the release. It complained that the executable is damaged but I assume there's maybe something different required for mac silicon (which is what I tried to install on)

Thank you!

Prerequisites

  • Using npm
  • Using an up-to-date main branch
  • Using latest version of devtools. Check the docs for how to update
  • Tried solutions mentioned in #400
  • For issue in production release, add devtools output of DEBUG_PROD=true npm run build && npm start

Expected Behavior

Installs

Current Behavior

Complains that executable is damaged

Steps to Reproduce

Download and try to install on mac silicon

Possible Solution (Not obligatory)

Build path specifically for apple silicon?

Context

Using a mac air with M1 chip

Your Environment

  • Node version :
  • electron-react-boilerplate version or branch :
  • Operating System and version : Mac OS m1
  • Link to your project :
@nickvazz nickvazz added the bug Something isn't working label Jun 16, 2024
@peancored
Copy link
Owner

peancored commented Jun 16, 2024

Hi @nickvazz, thanks for reporting!

Which .dmg did you try to install? Please make sure that you install the DrumHero-0.2.1-arm64.dmg version.

If that doesn't work please let me know.

@peancored
Copy link
Owner

Just tried that, you're right, something is not right with that version. However, the other .dmg works for me (I'm also on mac M1). Could you please try that one while I try to fix the arm-64 version?

@nickvazz
Copy link
Author

This is with the arm64 version
image

@nickvazz
Copy link
Author

Nevermind this last image, when using the non-amd64 executable, It looks like it was able to be installed - i might have had the previous version still mounted

@peancored
Copy link
Owner

In order to fix that issue, you need to follow these steps.

As for the arm64 version, it's weird, I can install it locally when I build, but when I upload to github, download and install the app is broken. It might take a while to investigate what's going on.

@nickvazz
Copy link
Author

Instead once it starts up,
image

@peancored
Copy link
Owner

Found the solution:

The binary isn't signed so you'll have to remove the file from quarantine once you install the arm64 ver.

# Change the path if necessary
xattr -r -d com.apple.quarantine /Applications/DrumHero.app

@nickvazz
Copy link
Author

it worked!

That worked for installing the arm64.dmg without getting the damaged error. Now it seems like the application flickers with what looks like the UI at startup, then becomes a blank white

almost

My guesses as to what could be happening:

  • Is there some sort of cache or something where the initial file path of things it's looking for is? When i had first installed the non amd64 version as you suggested, it did give me a popup of a folder selection menu, but never after initial startup.

  • Does it crash if there are too many songs? I have roughly 1500 songs I've downloaded

  • If the songs are damaged in a clone hero sense, does it crash? some of those downloads could be duplicates of broken files but haven't combed through yet

Thanks for the help and still very excited to try! :)

@peancored
Copy link
Owner

peancored commented Jun 17, 2024

Awesome!

  • Please, remove the ~/Library/Application Support/drum-hero folder and try opening the app again
  • It should not, I have 3000+ songs and it works fine
  • There might be some issues indeed if a song is broken, this is the case that I haven't tested. But something tells me that that's what's happening, since the blank screen shouldn't happen under any circumstance.

Try an isolated folder maybe with a limited number of songs and see whether it works correctly?

@peancored
Copy link
Owner

Oh actually, before you delete it, can you share your ~/Library/Application Support/drum-hero/config.json with me? It will help debug the issue.

@nickvazz
Copy link
Author

config.json

@nickvazz
Copy link
Author

When I delete the directory and relaunch, it gives me the option to select a directory of songs again.

Deleting the directory and pointing at a single song directory seems to work - so maybe it crashes with bad files 🤷🏾

@nickvazz
Copy link
Author

Thanks for the help debugging!
image

@peancored
Copy link
Owner

peancored commented Jun 18, 2024

The issue is that song: "/Users/nickvazz/Clone Hero/Songs/Motörhead - Motörhead"

Its config has a weird encoding. If you remove that folder and rescan the songs, everything should work as expected.

@nickvazz
Copy link
Author

Is there a way to tell from the config (obviously you were able to 😄) so I can toss any other bad songs as well

@peancored
Copy link
Owner

peancored commented Jun 18, 2024

The issue here is specifically related to the .ini encoding in the song folder, here's what the config contains:

		"fb99959a-38e5-4eac-9f3f-6afe3dbe6c4b": {
			"id": "fb99959a-38e5-4eac-9f3f-6afe3dbe6c4b",
			"dir": "/Users/nickvazz/Clone Hero/Songs/Motörhead - Motörhead",
			"��[\u0000s\u0000o\u0000n\u0000g\u0000]\u0000": true,
			"\u0000": true,
			"\u0000a\u0000r\u0000t\u0000i\u0000s\u0000t\u0000 \u0000": "\u0000 \u0000M\u0000o\u0000t\u0000�\u0000r\u0000h\u0000e\u0000a\u0000d\u0000",
			"\u0000n\u0000a\u0000m\u0000e\u0000 \u0000": "\u0000 \u0000M\u0000o\u0000t\u0000�\u0000r\u0000h\u0000e\u0000a\u0000d\u0000",
			"\u0000a\u0000l\u0000b\u0000u\u0000m\u0000 \u0000": "\u0000 \u0000M\u0000o\u0000t\u0000�\u0000r\u0000h\u0000e\u0000a\u0000d\u0000",
			"\u0000y\u0000e\u0000a\u0000r\u0000 \u0000": "\u0000 \u00001\u00009\u00007\u00007\u0000",
			"\u0000g\u0000e\u0000n\u0000r\u0000e\u0000 \u0000": "\u0000 \u0000H\u0000e\u0000a\u0000v\u0000y\u0000 \u0000M\u0000e\u0000t\u0000a\u0000l\u0000",
			"\u0000i\u0000c\u0000o\u0000n\u0000 \u0000": "\u0000 \u0000g\u0000h\u00003\u0000d\u0000l\u0000c\u0000",
			"\u0000t\u0000a\u0000g\u0000s\u0000 \u0000": "\u0000 \u0000m\u0000a\u0000s\u0000t\u0000e\u0000r\u0000",
			"\u0000u\u0000n\u0000l\u0000o\u0000c\u0000k\u0000_\u0000i\u0000d\u0000 \u0000": "\u0000 \u0000g\u0000h\u00003\u0000_\u0000d\u0000l\u0000c\u00001\u00005\u0000",
			"\u0000c\u0000h\u0000a\u0000r\u0000t\u0000e\u0000r\u0000 \u0000": "\u0000 \u0000<\u0000c\u0000o\u0000l\u0000o\u0000r\u0000=\u0000o\u0000r\u0000a\u0000n\u0000g\u0000e\u0000>\u0000N\u0000e\u0000v\u0000e\u0000r\u0000s\u0000o\u0000f\u0000t\u0000<\u0000/\u0000c\u0000o\u0000l\u0000o\u0000r\u0000>\u0000",
			"\u0000d\u0000i\u0000f\u0000f\u0000_\u0000b\u0000a\u0000n\u0000d\u0000 \u0000": "\u0000 \u0000-\u00001\u0000",
			"\u0000d\u0000i\u0000f\u0000f\u0000_\u0000g\u0000u\u0000i\u0000t\u0000a\u0000r\u0000 \u0000": "\u0000 \u0000-\u00001\u0000",
			"\u0000d\u0000i\u0000f\u0000f\u0000_\u0000b\u0000a\u0000s\u0000s\u0000 \u0000": "\u0000 \u0000-\u00001\u0000",
			"\u0000d\u0000i\u0000f\u0000f\u0000_\u0000d\u0000r\u0000u\u0000m\u0000s\u0000 \u0000": "\u0000 \u0000-\u00001\u0000",
			"\u0000d\u0000i\u0000f\u0000f\u0000_\u0000k\u0000e\u0000y\u0000s\u0000 \u0000": "\u0000 \u0000-\u00001\u0000",
			"\u0000d\u0000i\u0000f\u0000f\u0000_\u0000g\u0000u\u0000i\u0000t\u0000a\u0000r\u0000g\u0000h\u0000l\u0000 \u0000": "\u0000 \u0000-\u00001\u0000",
			"\u0000d\u0000i\u0000f\u0000f\u0000_\u0000b\u0000a\u0000s\u0000s\u0000g\u0000h\u0000l\u0000 \u0000": "\u0000 \u0000-\u00001\u0000",
			"\u0000p\u0000r\u0000e\u0000v\u0000i\u0000e\u0000w\u0000_\u0000s\u0000t\u0000a\u0000r\u0000t\u0000_\u0000t\u0000i\u0000m\u0000e\u0000 \u0000": "\u0000 \u0000-\u00001\u0000",
			"\u0000a\u0000l\u0000b\u0000u\u0000m\u0000_\u0000t\u0000r\u0000a\u0000c\u0000k\u0000 \u0000": "\u0000 \u00001\u00006\u00000\u00000\u00000\u0000",
			"\u0000p\u0000l\u0000a\u0000y\u0000l\u0000i\u0000s\u0000t\u0000_\u0000t\u0000r\u0000a\u0000c\u0000k\u0000 \u0000": "\u0000 \u00004\u00002\u0000",
			"\u0000v\u0000i\u0000d\u0000e\u0000o\u0000_\u0000s\u0000t\u0000a\u0000r\u0000t\u0000_\u0000t\u0000i\u0000m\u0000e\u0000 \u0000": "\u0000 \u00000\u0000",
			"\u0000d\u0000e\u0000l\u0000a\u0000y\u0000 \u0000": "\u0000 \u00000\u0000",
			"\u0000s\u0000o\u0000n\u0000g\u0000_\u0000l\u0000e\u0000n\u0000g\u0000t\u0000h\u0000 \u0000": "\u0000 \u00001\u00009\u00008\u00002\u00008\u00002\u0000"
		},

The .ini file contains meta information about a song - its name, album, difficulty, etc.
But in that specific .ini config the keys and values are not properly encoded, and that's why the app breaks when trying to display song names in the list (song.name is undefined).
I don't think it's necessarily because the song itself is damaged, so you won't be able to tell that from config, unfortunately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants