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

Install crashes and corrupts every time at the same point "python setup.py egg_info #325

Closed
stayingarmed opened this issue Dec 9, 2022 · 151 comments

Comments

@stayingarmed
Copy link

A few months ago this program worked fine on my Galaxy Note 8 but then there was an update on my phone that restarted it and at this point it never installs and always corrupts.

Screenshot_20221209-145004_OctoPrint For Android

@Jano952
Copy link

Jano952 commented Dec 11, 2022

I am not gonna lie, I am noob, but somehow I made it working. I did steps I saw in OctoPrintHandlerRepository.kt file between lines 122-144 and used the fix by @sashokbg in #319. Here is how to do it using SSH commands, so you dont have to modify the .apk!

  1. Install Octo4A, let it install OctoPrint. Let the setup go, let it crash.
  2. Start the Octo4A, you can see it is corrupted, but dont reinstall !
  3. Go to Config, enable OpenSSH and set Port and Password.
  4. Log into SSH from your computer or whatever. (ssh root@IP -p PORT)
  5. Now enter command, always wait for finish:
    pip3 install --upgrade setuptools wheel tornado --no-cache-dir
  6. I am not sure with the next command, it is probably not needed, but i put it in:
    curl -s https://raw.githubusercontent.com/feelfreelinux/octo4a/master/scripts/setup-octo4a.sh | bash -s
  7. Then enter this, once asked, overwrite all files:
    unzip octoprint.zip
  8. And finally this command (ALSO COPY THE DOT):
    cd Octo* && pip3 install .
  9. I also installed plugin extras from the setting menu
  10. Now Force stop the app somehow (I needed to go to app setting and force stop on my Huaweii P20 Pro, I did similar on Redmi Note 4)
  11. Turn on the Octo4A, and it should work !

@TheDooblem
Copy link

Thank You! This worked. If only I had found this before factory resetting my phone and forgetting to save the backup. Oh well.

@epsilontheta
Copy link

@Jano952 can confirm that this is working for me also. Thank you!

@KubaArrow
Copy link

@Jano952 You are amazing 😄
On Redmi Note 5 working

@drhealx
Copy link

drhealx commented Dec 11, 2022

Im having the same Problem on a Redmi Note 5 and cant get past this step. Where do i see the needed IP Adress from the phone?

Log into SSH from your computer or whatever. (ssh root@IP -p PORT)

@KubaArrow
Copy link

KubaArrow commented Dec 11, 2022

@drhealx In details wifi connect or DHCP clients in router panel
To SSH I used putty

@drhealx
Copy link

drhealx commented Dec 11, 2022

@KubaArrow Thanks, that worked so far but i still have a corrupted installation after the other steps. I'll try it again later, maybe i did something wrong

@Jano952
Copy link

Jano952 commented Dec 11, 2022

@drhealx did you force stop Octo4A? It checks for succesfull instalation only after you totally stop the app. I had to go to Android settings -> apps -> Octoprint for Android and force stop it, otherwise it kept running in background somehow.

@drhealx
Copy link

drhealx commented Dec 11, 2022

@Jano952 yes, i stopped it by tapping on "App info" -> "force stop". But i recognized that in the following Step:
"Step 8. And finally this command (ALSO COPY THE DOT):
cd Octo* && pip3 install ."
i got an error message that said something like:
"dont know the command 'install.' did you mean 'install'" and i just ignored that message, maybe thats the problem

Edit: Oh, i now see that theres a Space between "intall" and the "dot", think i didnt type that and this can be the issue, i'll try that again

Edit2: Did it again step by step and now it worked. Thanks for the help

@stayingarmed
Copy link
Author

Can confirm....this worked for me as well! Thank you for coming up with this solution!!!!! Now I can use my Galaxy Note 8 to run my printer instead of this old raspberry pi!

@BertrandTheHealer
Copy link

I wasn't getting an error, the app was just crashing partway through installation and when I reopened it I would get the "Installation Corrupted" text.

Jano952's instructions fixed it for me.

@micah-simmler
Copy link

Followed and seems to be working for me. Thanks!

@RickzFPV
Copy link

RickzFPV commented Dec 11, 2022

@Jano952 hey is there any chance you could give better directions on how to do this for someone that pretty much knows nothing about android but can follow directions really well. The thing I cant understand or figure out is what you mean is #4 of your instructions. I can ssh into my raspberry pi's with no issue but do not understand at all on android

@Jano952
Copy link

Jano952 commented Dec 11, 2022

@RickzFPV Once you setup the SSH it is easy job (In Win10 you can simply use command prompt to run ssh). Sadly I dont have blog, but maybe I can create video about it. I hope the install script will simply get fixed in coming days and nothing will have to be changed.

@micah-simmler
Copy link

@Jano952 hey is there any chance you could give better directions on how to do this for someone that pretty much knows nothing about android but can follow directions really well. The thing I cant understand or figure out is what you mean is #4 of your instructions. I can ssh into my raspberry pi's with no issue but do not understand at all on android

Where are you stuck, enabling SSH? It is an option in settings will prompt for a password. Install Putty and SSH to your Phone IP with port 8022 which was the default.

Once you get connected username is root with the password you specified then give it these commands one at a time.

pip3 install --upgrade setuptools wheel tornado --no-cache-dir
curl -s https://raw.githubusercontent.com/feelfreelinux/octo4a/master/scripts/setup-octo4a.sh | bash -s
unzip octoprint.zip
cd Octo* && pip3 install .

Install Plugin Extras option on the phone

Go into App Settings and Force Close the App then you should be good.

@RickzFPV
Copy link

@micah-simmler Thank you So much Got it going on the tablet. I have one of the blue Tracphones running android 11that I would also like to set it up on. when I try and log in through putty it tells me refused. is there a setting I need to change in the phone to get it going

@micah-simmler
Copy link

micah-simmler commented Dec 11, 2022

@micah-simmler Thank you So much Got it going on the tablet. I have one of the blue Tracphones running android 11that I would also like to set it up on. when I try and log in through putty it tells me refused. is there a setting I need to change in the phone to get it going

Just make sure It is enabled and you are on the right port should be it not sure what else it could be. I just tried it on mine without SSH Enabled and it says connection refused. I know Putty Defaults to port 22 for SSH but Octo4a is 8022

@RickzFPV
Copy link

ok I will give it a try again

@RickzFPV
Copy link

@micah-simmler is there something I am missing with a setting on the phone or something with this Blue view 2 it keeps kicking back a network error connection refused. The tablet is good to go but can't for the life of me get into the phone

@Saurabh251-cmd
Copy link

worked here too thx

@thomasbra1
Copy link

@micah-simmler is there something I am missing with a setting on the phone or something with this Blue view 2 it keeps kicking back a network error connection refused. The tablet is good to go but can't for the life of me get into the phone

I tried to do this on a B131DL BV2 and after the failed install it will try to enable ssh but then immediately kill it. So it seems it can't install enough to try the fix on it.

@SR10638
Copy link

SR10638 commented Dec 13, 2022

If your getting the SSH network error-Connection refused via whatever client (PuTTY/Terminal/CMD),you can try via your browser directly. I found going to the address http://(PHONES IP ADDRESS):5002/ will prompt for the ssh credentials you set in the config on the app (user:root, pass:whatever you set). You'll be viewing a live terminal session from the linux OS the app sets up. You can enter the commands directly on this page just like in an SSH client. Just continue the above instructions from step 5 down and you should be good to go. Note: If your going to copy paste the commands, when pasting into the web terminal use: Ctrl+Shift+V. Also remember that the Octoprint's web console for management is on port 5000 NOT 5002, so managing Octoprint will be at http://(PHONES IP ADDRESS):5000/.

@micah-simmler
Copy link

One thing to look for is make sure you know what IP your phone was assigned by default they randomize the MAC address and I kept getting different IP addresses until I set it to use my device MAC.

@Lilbrulesall
Copy link

Lilbrulesall commented Dec 13, 2022

I am not gonna lie, I am noob, but somehow I made it working. I did steps I saw in OctoPrintHandlerRepository.kt file between lines 122-144 and used the fix by @sashokbg in #319. Here is how to do it using SSH commands, so you dont have to modify the .apk!

  1. Install Octo4A, let it install OctoPrint. Let the setup go, let it crash.
  2. Start the Octo4A, you can see it is corrupted, but dont reinstall !
  3. Go to Config, enable OpenSSH and set Port and Password.
  4. Log into SSH from your computer or whatever. (ssh root@IP -p PORT)
  5. Now enter command, always wait for finish:
    pip3 install --upgrade setuptools wheel tornado --no-cache-dir
  6. I am not sure with the next command, it is probably not needed, but i put it in:
    curl -s https://raw.githubusercontent.com/feelfreelinux/octo4a/master/scripts/setup-octo4a.sh | bash -s
  7. Then enter this, once asked, overwrite all files:
    unzip octoprint.zip
  8. And finally this command (ALSO COPY THE DOT):
    cd Octo* && pip3 install .
  9. I also installed plugin extras from the setting menu
  10. Now Force stop the app somehow (I needed to go to app setting and force stop on my Huaweii P20 Pro, I did similar on Redmi Note 4)
  11. Turn on the Octo4A, and it should work !

For some reason, when I get to step 7, it says operation not permitted. Does anyone know why this would be? I get tthe prompt to replace and tell it "A" to replace them all, but each one fails saying "(warning) cannot set modif./access times" "Operation Not Permitted"

EDIT: I continued to follow the steps and ignored the errors and it works great now. Thank you so much for this!

@tom0579
Copy link

tom0579 commented Dec 13, 2022

Jano952, Thank you for sharing this method , believe is the only that works for the majoraty. just two small notes for who is using an android box with ethernet connection like me. The first start is necessary to remove camera permissions if you set this before. Also to enable the server is necessary to turn ON wifi even if you are using only ethernet , if not will not pic an IP. My box is an Amnlogic S912 8 core 1.5 Ghz , 2 GB ram android 6.0.1 rooted. It works like a charm now.

@ZevaKikel
Copy link

I am not gonna lie, I am noob, but somehow I made it working. I did steps I saw in OctoPrintHandlerRepository.kt file between lines 122-144 and used the fix by @sashokbg in #319. Here is how to do it using SSH commands, so you dont have to modify the .apk!
....

I'm not going to ask you how you managed to get this fix, but you have all my admiration! It has worked for me too!!! Thank you!!!

@jasdall
Copy link

jasdall commented Feb 3, 2023

For me worked only the 0.0.5. on a Samsung Galaxy Nexus 10 tablet. Pity not working the new version 1.1.2

@RickzFPV
Copy link

RickzFPV commented Feb 9, 2023

@SR10638 I bought one of the Invavo Quadra's myself and it is way superior to running octo4A. It looks like though they finally fixed the problem with the new release for most people. I personally tested the new release on android 9, 10, 12, and 13 and had no issues. I think they broke something in android 11 that will probably never get fixed, so those devices seem like they will not work. I am using the octoprint delpoy now and running 4 printers from the quadra, and 3 printers from my raspberry pi 4, for my small print farm. Makes things so much easier

@futhgar
Copy link

futhgar commented Feb 10, 2023

Just Curious has anyone been able to sucessfully ssh into android 11 is so could you please let me know how you did it

Thanks Rick

@RickzFPV Before you SSH - make a network with another phone (hotspot) and have the android phone you are trying to SSH into connected to this network as well as the computer you are using to SSH. This worked out for me really well to be able to access the android phone via SSH.

@Sejkorka
Copy link

I am not gonna lie, I am noob, but somehow I made it working. I did steps I saw in OctoPrintHandlerRepository.kt file between lines 122-144 and used the fix by @sashokbg in #319. Here is how to do it using SSH commands, so you dont have to modify the .apk!

  1. Install Octo4A, let it install OctoPrint. Let the setup go, let it crash.
  2. Start the Octo4A, you can see it is corrupted, but dont reinstall !
  3. Go to Config, enable OpenSSH and set Port and Password.
  4. Log into SSH from your computer or whatever. (ssh root@IP -p PORT)
  5. Now enter command, always wait for finish:
    pip3 install --upgrade setuptools wheel tornado --no-cache-dir
  6. I am not sure with the next command, it is probably not needed, but i put it in:
    curl -s https://raw.githubusercontent.com/feelfreelinux/octo4a/master/scripts/setup-octo4a.sh | bash -s
  7. Then enter this, once asked, overwrite all files:
    unzip octoprint.zip
  8. And finally this command (ALSO COPY THE DOT):
    cd Octo* && pip3 install .
  9. I also installed plugin extras from the setting menu
  10. Now Force stop the app somehow (I needed to go to app setting and force stop on my Huaweii P20 Pro, I did similar on Redmi Note 4)
  11. Turn on the Octo4A, and it should work !

I have this error: unzip: cannot find or open octoprint.zip, octoprint.zip.zip or octoprint.zip.ZIP. and i dont know how to fix this, can you help me please?

@shogun-fpv
Copy link

@futhgar I tried your suggestion but still got the "connection refused" message. I'm not sure how you get around this issue, since the problem is that the octo4 app kills ssh almost immediately after enabling it.

@FKentD
Copy link

FKentD commented Feb 12, 2023 via email

@willuk1987
Copy link

I have this error: unzip: cannot find or open octoprint.zip, octoprint.zip.zip or octoprint.zip.ZIP. and i dont know how to fix this, can you help me please?

Did you manage to get round this im having the same error

@RickzFPV
Copy link

@willuk1987 what version are you trying to use the new 1.2.0 fixed it so you don’t have to do the workaround anymore

@willuk1987
Copy link

@RickzFPV i think i messed up i started on a fresh s7 but was still running android 7 I'm updating to 9 now and ill see if it works I'm using the most recent version, so hopefully will work once i update the os

@Danthony04
Copy link

Hey, I've been having the corrupted installation issue as well, and I've tried installing on 2 different devices. A galaxy core prime running android 5.1, and a LG G5 with android 7. neither of them has worked even after I tried Jano952's trick multiple times. I think the problem has something to do with when I do step #7. After every line when it says "inflating: Octoprint, etc." It then says "Operation not permitted" all the way down until that step finishes.

looks like this:
inflating: OctoPrint-OctoPrint-ab3ebf1/tests/util/test_platform.py (warning) cannot set modif./access times
Operation not permitted
inflating: OctoPrint-OctoPrint-ab3ebf1/tests/util/test_repeated_timer.py (warning) cannot set modif./access times
Operation not permitted
inflating: OctoPrint-OctoPrint-ab3ebf1/tests/util/test_resettable_timer.py (warning) cannot set modif./access times
Operation not permitted
inflating: OctoPrint-OctoPrint-ab3ebf1/tests/util/test_string_helpers.py (warning) cannot set modif./access times
Operation not permitted
inflating: OctoPrint-OctoPrint-ab3ebf1/tests/util/test_version.py (warning) cannot set modif./access times
Operation not permitted
inflating: OctoPrint-OctoPrint-ab3ebf1/translations/de/LC_MESSAGES/messages.mo (warning) cannot set modif./access times
Operation not permitted
inflating: OctoPrint-OctoPrint-ab3ebf1/translations/de/LC_MESSAGES/messages.po (warning) cannot set modif./access times
Operation not permitted
inflating: OctoPrint-OctoPrint-ab3ebf1/translations/messages.pot (warning) cannot set modif./access times
Operation not permitted
inflating: OctoPrint-OctoPrint-ab3ebf1/versioneer.py (warning) cannot set modif./access times
Operation not permitted

Also, after every step it says something in yellow print about using 'root' user can lead to permission errors.

@Danthony04
Copy link

I can install and run octo4a version 0.5 just fine, but anything else gets corrupted and gives the problem stated above.

@RickzFPV
Copy link

I’m not sure how to help because I don’t have any devices that old to test with I can only go back to Android 9

@Jalalhelou
Copy link

Hey all,
For anyone who could not get Octo4a running, even with trying all the above fixes, this might work.
I kept having "operation not permitted" errors with pip when it is installing Octoprint (and when unzipping and replacing all the files). I ignored it and just issued this command inside of the Octoprint directory
pip3 install Octoprint
instead of the dot. It downloaded the package and installed it properly. I would not skip any commands from other suggestions before this, as they might have provided the correct requirements.

I am still having issues with getting Octolapse to work, or getting any plugin, but Octoprint essentially is working and was able to control my printer over OTG.

@Danthony04
Copy link

Danthony04 commented Mar 14, 2023

thanks, running: cd Octo* and then: pip3 install Octoprint actually worked both on my galaxy core prime with android 5 and my LG G5 with android 7. I was getting some weird "Operation not permitted" errors too but this seems to have fixed it.

@LeyKlussyn
Copy link

LeyKlussyn commented Mar 16, 2023

I got it running on an Huawei Honor 8 (android 7). I didn't test how well it works in practice or installed plugins yet, but I can go in octoprint on my PC browser at least. After having the 'installation corrupted' error, and then having the 'operation not permitted' problem (as stated above), at least it run. I just did exactly what was said in the two comments above, but I'll reiterate my exact steps in case it helps somebody else:

  • Install Octo4A, let it install OctoPrint. Let the setup go, let it crash.
  • Start the Octo4A, you can see it is corrupted, but dont reinstall.
  • Go to Config, enable OpenSSH and set Port and Password.
  • Log into SSH from your computer or somewhere else. (ssh root@IP -p PORT. Example, ssh [email protected] -p 8022), I did it in windows cmd, it works well. (Can't remember if you have to install ssh or it comes natively). You DO need to get the IP of your phone on your local network, I got mine via my wifi router interface, there's probably other ways as well.
  • Now that's where it changes from the earlier solution.
  • First, put yourself in the octoprint directory using cd Octo*
  • Then do pip3 install Octoprint
  • Once everything is completed done (you may have some yellow warnings), you can close down the terminal. On your phone, force close the Octo4a app using your system settings.
  • Launch the app again. If it did work like me, OctoPrint should be launching, eventually running and giving you the IP to access it.
  • (You may also go back in your settings and close down ssh if you so wish)

I hope it helps someone. On my side, I still have to get an USB OTG adapter, so I'll update with results if I have some.

@mactep
Copy link

mactep commented May 4, 2023

For the ones that still can't make it work, try to set OctoPrint manually through termux, thread for reference. In short:

  • Install termux
  • Install octoprint using the manual setup
  • Install this plugin to access the printer via serial port

For camera support, install IP Webcam, DroidCam or any other app that provides a URL with the camera feed and put it in OctoPrint configs. For timelapse, change the path to ffmpeg to /data/data/com.termux/files/usr/bin/ffmpeg.

@neirottimatteo
Copy link

i Got This error on step 8:

Building wheel for OctoPrint (pyproject.toml) ... error
error: subprocess-exited-with-error

× Building wheel for OctoPrint (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [20 lines of output]
/tmp/pip-build-env-3hi0cxvs/overlay/lib/python3.10/site-packages/setuptools/config/setupcfg.py:293: _DeprecatedConfig: Deprecated config in setup.cfg
!!

          ********************************************************************************
          The license_file parameter is deprecated, use license_files instead.
  
          By 2023-Oct-30, you need to update your project and remove deprecated calls
          or your builds will no longer be supported.
  
          See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
          ********************************************************************************
  
  !!
    parsed = self.parsers.get(option_name, lambda x: x)(value)
  running bdist_wheel
  running build
  running build_py
  RUNNING copy_files_build_py
  Copying AUTHORS.md to build/lib/octoprint/templates/_data/AUTHORS.md
  error: [Errno 1] Operation not permitted
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for OctoPrint
Building wheel for emoji (setup.py) ... done
WARNING: Building wheel for emoji failed: [Errno 1] Operation not permitted
Running setup.py clean for emoji
Building wheel for future (setup.py) ... done
WARNING: Building wheel for future failed: [Errno 1] Operation not permitted
Running setup.py clean for future
Building wheel for watchdog (setup.py) ... done
WARNING: Building wheel for watchdog failed: [Errno 1] Operation not permitted
Running setup.py clean for watchdog
Building wheel for sgmllib3k (setup.py) ... done
WARNING: Building wheel for sgmllib3k failed: [Errno 1] Operation not permitted
Running setup.py clean for sgmllib3k
Failed to build OctoPrint emoji future watchdog sgmllib3k
ERROR: Could not build wheels for OctoPrint, which is required to install pyproject.toml-based projects

@wqpalmer
Copy link

I got it running on an Huawei Honor 8 (android 7). I didn't test how well it works in practice or installed plugins yet, but I can go in octoprint on my PC browser at least. After having the 'installation corrupted' error, and then having the 'operation not permitted' problem (as stated above), at least it run. I just did exactly what was said in the two comments above, but I'll reiterate my exact steps in case it helps somebody else:

  • Install Octo4A, let it install OctoPrint. Let the setup go, let it crash.
  • Start the Octo4A, you can see it is corrupted, but dont reinstall.
  • Go to Config, enable OpenSSH and set Port and Password.
  • Log into SSH from your computer or somewhere else. (ssh root@IP -p PORT. Example, ssh [email protected] -p 8022), I did it in windows cmd, it works well. (Can't remember if you have to install ssh or it comes natively). You DO need to get the IP of your phone on your local network, I got mine via my wifi router interface, there's probably other ways as well.
  • Now that's where it changes from the earlier solution.
  • First, put yourself in the octoprint directory using cd Octo*
  • Then do pip3 install Octoprint
  • Once everything is completed done (you may have some yellow warnings), you can close down the terminal. On your phone, force close the Octo4a app using your system settings.
  • Launch the app again. If it did work like me, OctoPrint should be launching, eventually running and giving you the IP to access it.
  • (You may also go back in your settings and close down ssh if you so wish)

I hope it helps someone. On my side, I still have to get an USB OTG adapter, so I'll update with results if I have some.

well this got me to a point where the app is no longer saying that installation is corrupted, so those final steps were helpful for me, thank you! I've still gotta keep chopping away at it, but progress is progress! 😁🙏

@robigombek
Copy link

I got it running on an Huawei Honor 8 (android 7). I didn't test how well it works in practice or installed plugins yet, but I can go in octoprint on my PC browser at least. After having the 'installation corrupted' error, and then having the 'operation not permitted' problem (as stated above), at least it run. I just did exactly what was said in the two comments above, but I'll reiterate my exact steps in case it helps somebody else:

  • Install Octo4A, let it install OctoPrint. Let the setup go, let it crash.
  • Start the Octo4A, you can see it is corrupted, but dont reinstall.
  • Go to Config, enable OpenSSH and set Port and Password.
  • Log into SSH from your computer or somewhere else. (ssh root@IP -p PORT. Example, ssh [email protected] -p 8022), I did it in windows cmd, it works well. (Can't remember if you have to install ssh or it comes natively). You DO need to get the IP of your phone on your local network, I got mine via my wifi router interface, there's probably other ways as well.
  • Now that's where it changes from the earlier solution.
  • First, put yourself in the octoprint directory using cd Octo*
  • Then do pip3 install Octoprint
  • Once everything is completed done (you may have some yellow warnings), you can close down the terminal. On your phone, force close the Octo4a app using your system settings.
  • Launch the app again. If it did work like me, OctoPrint should be launching, eventually running and giving you the IP to access it.
  • (You may also go back in your settings and close down ssh if you so wish)

I hope it helps someone. On my side, I still have to get an USB OTG adapter, so I'll update with results if I have some.

This simple method worked perfectly on the Honor 8 FDR-L19 (4/64 GB). And I already thought there was no getting around the Raspberry Pi, thank you and Jano952

@up209d
Copy link

up209d commented Oct 2, 2023

I got it running on an Huawei Honor 8 (android 7). I didn't test how well it works in practice or installed plugins yet, but I can go in octoprint on my PC browser at least. After having the 'installation corrupted' error, and then having the 'operation not permitted' problem (as stated above), at least it run. I just did exactly what was said in the two comments above, but I'll reiterate my exact steps in case it helps somebody else:

  • Install Octo4A, let it install OctoPrint. Let the setup go, let it crash.
  • Start the Octo4A, you can see it is corrupted, but dont reinstall.
  • Go to Config, enable OpenSSH and set Port and Password.
  • Log into SSH from your computer or somewhere else. (ssh root@IP -p PORT. Example, ssh [email protected] -p 8022), I did it in windows cmd, it works well. (Can't remember if you have to install ssh or it comes natively). You DO need to get the IP of your phone on your local network, I got mine via my wifi router interface, there's probably other ways as well.
  • Now that's where it changes from the earlier solution.
  • First, put yourself in the octoprint directory using cd Octo*
  • Then do pip3 install Octoprint
  • Once everything is completed done (you may have some yellow warnings), you can close down the terminal. On your phone, force close the Octo4a app using your system settings.
  • Launch the app again. If it did work like me, OctoPrint should be launching, eventually running and giving you the IP to access it.
  • (You may also go back in your settings and close down ssh if you so wish)

I hope it helps someone. On my side, I still have to get an USB OTG adapter, so I'll update with results if I have some.

What you did is basically discard the local package Octo** and install octoprint from pip package repository. So you can just delete the Octo** folder and octoprint.zip file. You can run pip3 install octoprint from anywhere, the octoprint package is going to be installed in your site-packages folder of your current python version, in this case, python-3.10.

octo4a app run command octoprint serve to start the octoprint server.

In short, this repo is failing as introducing a lot of bugs and compatibility issue, due to alpine setup (i guess). I managed to start octoprint but then the serial connection for my printer is messed up by this setup again to a point i wouldn't bother sticking around.

The approach from @mactep works like a charm and you have full control of what you are doing

For the ones that still can't make it work, try to set OctoPrint manually through termux, thread for reference. In short:

  • Install termux
  • Install octoprint using the manual setup
  • Install this plugin to access the printer via serial port

For camera support, install IP Webcam, DroidCam or any other app that provides a URL with the camera feed and put it in OctoPrint configs. For timelapse, change the path to ffmpeg to /data/data/com.termux/files/usr/bin/ffmpeg.

@guillaume52
Copy link

  1. Then enter this, once asked, overwrite all files:
    unzip octoprint.zip

Step 7 fails because the folder exists already so it needs to be deleted before running the unzip command

@SonOfSardaar
Copy link

SonOfSardaar commented Dec 9, 2023

I am not gonna lie, I am noob, but somehow I made it working. I did steps I saw in OctoPrintHandlerRepository.kt file between lines 122-144 and used the fix by @sashokbg in #319. Here is how to do it using SSH commands, so you dont have to modify the .apk!

  1. Install Octo4A, let it install OctoPrint. Let the setup go, let it crash.
  2. Start the Octo4A, you can see it is corrupted, but dont reinstall !
  3. Go to Config, enable OpenSSH and set Port and Password.
  4. Log into SSH from your computer or whatever. (ssh root@IP -p PORT)
  5. Now enter command, always wait for finish:
    pip3 install --upgrade setuptools wheel tornado --no-cache-dir
  6. I am not sure with the next command, it is probably not needed, but i put it in:
    curl -s https://raw.githubusercontent.com/feelfreelinux/octo4a/master/scripts/setup-octo4a.sh | bash -s
  7. Then enter this, once asked, overwrite all files:
    unzip octoprint.zip
  8. And finally this command (ALSO COPY THE DOT):
    cd Octo* && pip3 install .
  9. I also installed plugin extras from the setting menu
  10. Now Force stop the app somehow (I needed to go to app setting and force stop on my Huaweii P20 Pro, I did similar on Redmi Note 4)
  11. Turn on the Octo4A, and it should work !

I am getting permission denied error on step 7 and this error on step 8 Any Ideas

image

UPDATE: I wiped my android phone to try this again, turns out you don't need any of these steps to fix the issue if your installation failed at 50% while installing dependencies. All you need to do is go to ssh terminal and run "pip install octoprint" then you force close your octo4a app, start the app again and it should work.

Note: I am still left with this issue where octa4a detects my otg port but octoprint is not showing any ports

@Bravelyan
Copy link

Screenshot_20240526-192828

How to solve this?

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

No branches or pull requests