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

Self-hosted package installation fail #906

Open
mrtaracqk opened this issue Jan 8, 2024 · 2 comments
Open

Self-hosted package installation fail #906

mrtaracqk opened this issue Jan 8, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@mrtaracqk
Copy link

🐛 Bug Report

I'm having trouble installing SuperTokens. I'm trying to install the self-hosted version on my MacBook with an M2 chip. I run ".install" and see the download process, but it crashes with the following log.

I think this may be related to the Apple Silicon because I previously installed it successfully on my Intel MacBook.

Useful informations

Installation log:

Downloading (33/36): https://repo1.maven.org/maven2/de/mkammerer/argon2-jvm/2.11/argon2-jvm-2.11.jar into cli
Downloading (34/36): https://repo1.maven.org/maven2/de/mkammerer/argon2-jvm-nolibs/2.11/argon2-jvm-nolibs-2.11.jar into cli
Downloading (35/36): https://repo1.maven.org/maven2/org/mindrot/jbcrypt/0.4/jbcrypt-0.4.jar into cli
Downloading (36/36): https://repo1.maven.org/maven2/net/java/dev/jna/jna/5.8.0/jna-5.8.0.jar into cli
java.io.IOException: No such file or directory
	at java.base/java.io.UnixFileSystem.createFileExclusively(Native Method)
	at java.base/java.io.File.createNewFile(File.java:1026)
	at io.supertokens.cli.commandHandler.install.InstallHandler.createSupertokensScript(InstallHandler.java:146)
	at io.supertokens.cli.commandHandler.install.InstallHandler.doCommand(InstallHandler.java:61)
	at io.supertokens.cli.commandHandler.CommandHandler.handleCommand(CommandHandler.java:31)
	at io.supertokens.cli.Main.start(Main.java:101)
	at io.supertokens.cli.Main.main(Main.java:50)

error while installing SuperTokens. Please try again

Info from version.yaml:

core_version: 7.0.16
plugin_interface_version: 4.0.5
plugin_version: 5.0.5
plugin_name: mysql

Setup:
M2 Pro chip, macOS Sonoma 14.2.1 (23C71)

@mrtaracqk mrtaracqk added the bug Something isn't working label Jan 8, 2024
@rishabhpoddar
Copy link
Member

I think this may be related to the Apple Silicon because I previously installed it successfully on my Intel MacBook.

Thats probably correct. We can investigate when we have time. In the meantime, you could try using our docker image instead.

@nyko28
Copy link

nyko28 commented Apr 11, 2024

TLDR : before running the installation script, run

sudo mkdir /usr/local/bin

Hey,

I encountered the same issue on mac M3. The interesting part of the log is :
io.supertokens.cli.commandHandler.install.InstallHandler.createSupertokensScript(InstallHandler.java:146)

The createSupertokensScript method calls getSupertokensScriptLocation to know where to create the supertokens script file depending on the running OS. For mac we have this condition :

else if (OperatingSystem.getOS() == OperatingSystem.OS.MAC) {
    return "/usr/local/bin/supertokens";
} 

We then try to create the supertokens script under /usr/local/bin. But it appears that after a fresh install of MacOS, this "bin" directory does not necessary exist. So the you just have to create it before running the installation script and everything will be ok :)

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

3 participants