-
Notifications
You must be signed in to change notification settings - Fork 663
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
Google Drive is no longer functional in Settings, File Storage, Upload Media Files #2625
Comments
See # #2611. I did point out the warning doing Obtain Key "Google will soon block apps that don’t comply with Google’s security policies ...this app should stop using unsupported OAuth flows". I guess that has now happened. |
Hi So it looks like all uploads to google drive now fail. Do the devs have any plans to fix this or maybe integrate something else like nextcloud or backblaze B2 https://www.backblaze.com/b2/docs/ ? |
I am also facing this issue. Here is my workaround for now for others looking for a solution. I originally ran motioneyeos but switched to running rasbian and installing motioneye. This way I could run a different tool that supports the new auth method to sync to google drive. So I dont use the "upload media" option in motioneye instead I'm using rclone. I followed this guide to install and setup rclone besides the last couple steps about mounting your drive. I didnt need my full drive fully and permanently mounted. I then setup a cron job to run every 15 mins and use the rclone sync command to sync my cameras media directory to a folder on my google drive.
This copies the files saved from "Camera1" to a folder on my google drive called "cam", excludes thumb nail files that are also saved in that directory. Also it saves a log in /tmp. |
It is possible to work around this problem. I looked through a few issues related to this and I didn't seen anyone post this solution, so hopefully this will help a few people. The only issue is that Google no longer allows the OOB redirect URI that motioneye uses. So we can just replace that with e.g. We need to update these two lines: motioneye/motioneye/uploadservices.py Line 170 in 72af371
motioneye/motioneye/uploadservices.py Line 280 in 72af371
To instead be: 'redirect_uri': 'https://localhost/', Anyway, enough talk, here's how you do it: # I installed motioneye using pip, your installation directory may differ.
# Here's how I find my directory:
$ pip show motioneye
Name: motioneye
Version: 0.43.0
Summary: motioneye, a multilingual web interface for motion.
Home-page: https://github.com/motioneye-project/motioneye
Author: Calin Crisan, Jean Michault, ...
Author-email: [email protected]
License: GNU General Public License v3.0
Location: /usr/local/lib/python3.9/dist-packages
Requires: pillow, babel, pycurl, boto3, jinja2, tornado
Required-by:
# So my installation directory is /usr/local/lib/python3.9/dist-packages
# Navigate to it:
$ cd /usr/local/lib/python3.9/dist-packages
# Modify uploadservices.py using an editor that you are comfortable with:
$ sudo vim uploadservices.py
# Edit the two lines as mentioned above, replace urn:ietf:wg:oauth:2.0:oob with https://localhost/
# Make sure you save the file!!
# Then restart motioneye (IMPORTANT):
$ sudo systemctl restart motioneye If you did the steps above correctly, you should now be able to perform the authorization without error. Once you do that, you will be redirected to a non-working URL, e.g. You need to take the Click the Hope that helps. Enjoy! 😄 |
Thanks a lot @stefansundin, it's a so cool workaround! 🥇 |
Thanks,I will give it a try. My authorization key to upload to Google Drive lasted until mid November 2024. |
hello, |
I tried @stefansundin's workaround with my MotionEye running on Docker, and I'm sharing it helps Open a shell in the docker container (assuming its name is motioneye): Find the path of Replace the file (assuming the path is the default one): Check if the change was succesful: Exit the container and restart MotionEye: Unfortunately, even if all changes were made correctly, this workaround is not working for me. The non-working URL I receive does not include the I managed to make it work using rclone by syncing the folder where MotionEye stores the videos with Google Drive. |
See ticket in motionEyeOS: motioneye-project/motioneyeos#2954
The text was updated successfully, but these errors were encountered: