403 error when uploading mp4 video to Google Cloud Storage 2

Describe the problem/error/question

Every time I try to upload a single 6mb mp4 video into google cloud storage, it fails with a 403 error. It might be of note that i’m using Railway.app to host my n8n instance and i’m not on the n8n hosted cloud.

Also, pretty much everything I try to do in google cloud gives me a 403, even getting a file that exists. This seems to be the problem but i’m connected successfully via oauth and I have the app permissions all in place, etc.

What is the error message (if any)?

403 error

NodeApiError: Request failed with status code 403
    at RoutingNode.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/RoutingNode.js:114:23)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Workflow.js:695:23)
    at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:631:53

Please share your workflow

Share the output returned by the last node

Information on your n8n setup

  • n8n version: 1.4.1
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Railway
  • Operating system:

Hey @buildingthings,

Assuming the 403 is coming back from the Google Cloud Storage node it might be worth checking the binary data for any issues like characters in the name that Google doesn’t allow.

Does it work if you try a simple upload as well so for not ignore the sheet and just take one URL from it and put that directly into the http request node to see if that works.

Hi Jon,

1 - I am just trying to upload a single file, it was already filtered, basically every request to GCS is getting a 403. Trying to ‘get’ an existing folder, reading and writing anything. So yeah, even simple requests.

2 - The URL where my n8n is hosted looks like this: https://n8n-production-s5wk.up.railway.app/ - is there anything in there that looks like it could be getting rejected?

3 - One more thing if this helps, the problem is only happening with Google Cloud storage. I used the same Oauth settings for uploading the file into google drive and it executed successfully.

Hey @buildingthings,

Simple requests is a worry and it could be an issue with permissions on the Google side of things if nothing is working for it, Is the Cloud Storage API enabled in the Google App?

The URL for your n8n instance won’t matter, I have seen an issue in the past where some characters in filenames would cause an issue though.

  • Yes, google cloud storage API is enabled

  • My OAuth 2.0 Client ID is working correctly since I was able to upload to google drive using same credientials

  • added my own email as a test user inside the app, in the cloud console

  • the file name is just lowercase letters on both the input and output

  • I just tried to create a bucket (to test doing another operation) and it failed with an error 409

  • I did just successfully execute a “Get Many” operation inside the GCS node though. So I am connected for some things.

  • Any other potential avenues to explore? Authentication seems OK, I have tried a million variations for the configuration, but maybe i’m doing something wrong when inputting the Bucket name and Object name?

OK haha nevermind, we had configuration wrong :frowning:

2 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.