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

Support for ARM architecture devices #30

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

srividya-p
Copy link

A fix for #29

The platform.system() output for the Raspberry Pi OS is also 'Linux'.

system = platform.system()

This leads to a download of the wrong ngrok executable for ARM devices.

Added an additional if else statement in line #55 flask_ngrok.py

elif system == "Linux":
        if 'arm' in os.uname().machine and platform.architecture()[0] == '64bit':
            url="https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-arm64.zip"
        elif 'arm' in os.uname().machine and platform.architecture()[0] == '32bit':
            url="https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-arm.zip"
        else:
            url = "https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip"

@Aaronga19
Copy link

Plsss merge this hotfix, i need it for my container :c

@Aaronga19
Copy link

@srividya-p Hello, could you help me, i'm using your fork with the changes done but i still have the same error. 😢

@srividya-p
Copy link
Author

Hey Aarón! Could you please send a screenshot of the error?

Also let me know the output of os.uname(), platform.system() and platform.architecture() on your device.

For your reference, my fork was tested on a Raspberry Pi 3B+ and this is my output for those commands -

pi@raspberrypi:~ $ python3
Python 3.7.3 (default, Jan 22 2021, 20:04:44) 
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import os, platform
>>> os.uname()
posix.uname_result(sysname='Linux', nodename='raspberrypi', release='5.10.103-v7+', version='#1529 SMP Tue Mar 8 12:21:37 GMT 2022', machine='armv7l')
>>> platform.system()
'Linux'
>>> platform.architecture()
('32bit', 'ELF')

@Aaronga19
Copy link

This was so weird hehe
I do have a Raspberry PI 4 and I had the same features in my board. Now is working, I don't know why, I think that I had to reboot my board or something like this. However thanks for answering and helping me 😃

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 this pull request may close these issues.

None yet

2 participants