YouTube & Dropbox uploaders not working

Hi everyone!

Currently I'm running a set-up with a Raspberry Pi 4 with Raspberry camera and I have the YouTube and Dropbox uploader plugins installed (as well as Octolapse). For both of them I followed the necessary steps to connect them to my Dropbox and YouTube accounts, but both fail to perform their task. I have barely any experience with Raspberry and Python so I have no idea how to fix them. I feel like both of them are caused by the same problem, but I'm not sure what the problem is exactly. Any suggestions? So far the only thing that I can think of might be the issue is that I'm using the printer on the university network. They've approved the use of the Raspberry Pi and have allowed access to the network and I can access the Raspberry Pi, view the camera footage and everything, but maybe uploading the video footage might be prevented?

Like I said, I have barely any experience with Raspberry Pi and Python so please consider this in any answer/suggestion you might have :slight_smile:

Thank you so much in advance and have a great day!

Can you upload the systeminfo bundle?

Yes of course! I didn't know how to get those details, but your link helped! I copied the part after the print is finished. Reading this myself, I see that something went wrong in setting up both the Dropbox connection and the YouTube connection. I'll be looking into each of them myself too. I did follow the dedicated pages that showed a step-by-step process of how to set them up, but I guess I still did something wrong

2022-01-27 15:53:27,020 - octoprint.util.comm - INFO - Finished in 1982.147 s.
2022-01-27 15:53:27,021 - octoprint.util.comm - INFO - Changing monitoring state from "Printing" to "Finishing"
2022-01-27 15:53:27,046 - octoprint.printer.standard.job - INFO - Print job done - origin: local, path: Paste_Printing/January 2022/January 27, 2022/CubeV2_Test2_Flow95.gcode, owner: Gutharic
2022-01-27 15:53:27,177 - octoprint.util.comm - INFO - Changing monitoring state from "Finishing" to "Operational"
2022-01-27 15:53:27,268 - octoprint.plugins.excluderegion - INFO - Printing stopped: event=PrintDone
2022-01-27 15:53:27,271 - octoprint.plugins.octoeverywhere - INFO - RepeatTimer thread exit
2022-01-27 15:53:27,535 - octoprint.plugins.octoeverywhere - INFO - NotificationsHandler successfully sent 'done'; ETA: 0
2022-01-27 15:55:15,173 - octoprint.server.heartbeat - INFO - Server heartbeat <3
2022-01-27 15:57:50,605 - backoff - INFO - Backing off wait_for_auth_token(...) for 367.9s (None)
2022-01-27 15:59:29,082 - octoprint.plugins.dashboard - INFO - GcodePreProcessor started processing.
2022-01-27 15:59:29,125 - octoprint.filemanager.analysis - INFO - Starting analysis of local:Paste_Printing/January 2022/January 27, 2022/CubeV2_Test3_Flow90.gcode
2022-01-27 15:59:29,247 - octoprint.plugins.dashboard - INFO - GcodePreProcessor found layers: 10
2022-01-27 15:59:29,248 - octoprint.plugins.dashboard - INFO - GcodePreProcessor found filament changes: 0
2022-01-27 15:59:29,248 - octoprint.plugins.dashboard - INFO - GcodePreProcessor saving layer count in file metadata
2022-01-27 15:59:29,789 - octoprint.filemanager.analysis - INFO - Analysis of entry local:Paste_Printing/January 2022/January 27, 2022/CubeV2_Test3_Flow90.gcode finished, needed 0.66s
2022-01-27 15:59:42,356 - octoprint.printer.standard.job - INFO - Print job selected - origin: local, path: Paste_Printing/January 2022/January 27, 2022/CubeV2_Test3_Flow90.gcode, owner: Gutharic, user: Gutharic
2022-01-27 15:59:42,361 - octoprint.plugins.excluderegion - INFO - File selected, resetting internal state
2022-01-27 15:59:42,375 - octoprint.util.comm - INFO - Changing monitoring state from "Operational" to "Starting"
2022-01-27 15:59:42,378 - octoprint.printer.standard.job - INFO - Print job started - origin: local, path: Paste_Printing/January 2022/January 27, 2022/CubeV2_Test3_Flow90.gcode, owner: Gutharic, user: Gutharic
2022-01-27 15:59:42,404 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2022-01-27 15:59:42,407 - octoprint.util.comm - INFO - Communication timeout while printing, trying to trigger response from printer.
2022-01-27 15:59:42,417 - octoprint.util.comm - INFO - Changing monitoring state from "Starting" to "Printing"
2022-01-27 15:59:42,443 - octoprint.plugins.excluderegion - INFO - Printing started
2022-01-27 15:59:42,738 - octoprint.plugins.octoeverywhere - INFO - NotificationsHandler successfully sent 'started'; ETA: 1959
2022-01-27 16:00:14,739 - octoprint.plugins.dropbox_timelapse - INFO - Uploading CubeV2_Test2_Flow95_20220127152024.mp4 to Dropbox...
2022-01-27 16:00:20,166 - octoprint.plugin - ERROR - Error while calling plugin dropbox_timelapse
Traceback (most recent call last):
  File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/plugin/__init__.py", line 271, in call_plugin
    result = getattr(plugin, method)(*args, **kwargs)
  File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/util/__init__.py", line 1737, in wrapper
    return f(*args, **kwargs)
  File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_dropbox_timelapse/__init__.py", line 115, in on_event
    if self.upload_timelapse(file_path):
  File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_dropbox_timelapse/__init__.py", line 159, in upload_timelapse
    db.files_upload(f.read(), '/'+file_name, mode=WriteMode('overwrite'))
  File "/home/pi/oprint/lib/python3.7/site-packages/dropbox/base.py", line 2865, in files_upload
    f,
  File "/home/pi/oprint/lib/python3.7/site-packages/dropbox/dropbox_client.py", line 329, in request
    timeout=timeout)
  File "/home/pi/oprint/lib/python3.7/site-packages/dropbox/dropbox_client.py", line 485, in request_json_string_with_retry
    timeout=timeout)
  File "/home/pi/oprint/lib/python3.7/site-packages/dropbox/dropbox_client.py", line 604, in request_json_string
    raise BadInputError(request_id, r.text)
dropbox.exceptions.BadInputError: BadInputError('99362d69e42d4e8d9f4eeddddb8f074d', 'Error in call to API function "files/upload": Your app is not permitted to access this endpoint because it does not have the required scope \'files.content.write\'. The owner of the app can enable the scope for the app using the Permissions tab on the App Console.')
2022-01-27 16:00:20,183 - octoprint.plugins.youtube_timelapse - INFO - No Google credentials Defined! Cannot Upload Timelapse CubeV2_Test2_Flow95_20220127152024.mp4!

In the Dropbox App Console I just turned on files.content.write in permissions. I think that must be what has been preventing Octoprint to upload the videos. Please let me know if I'm mistaking. I'll look into YouTube next

Reading the error posted for dropbox, that seems like a sensible option.

I got both of them working! In Dropbox it was indeed the option that I mentioned in my previous comment and for YouTube I just did everything again with a different gmail account and that solved it. The only problem I have now is that YouTube automatically locks my videos in private. They seem to think it violates their policy and I can't make an appeal. Anyone that has got experience with this?

I had the plugin working, and then it stopped working.
At first, my problem was the files.content.write permission.

It worked for a handful of prints yesterday, when I was going back and forth, starting short test prints frequently. Then today, I'm seeing straight failures. I wonder if the access token expires if you don't send some keep alive? I'm going to include profile and openid, regenerate the token, see if that does anything.