Uploading source map to sentry for React Native Production build

1,139 views
Skip to first unread message

Brien Crean

unread,
Apr 27, 2016, 1:50:51 PM4/27/16
to sentry
Hi all,

I am trying to upload a source map to sentry I generated from my react native app.

# Upload a file for the given release
$ curl https://app.getsentry.com/api/0/projects/organization/project/releases/2da95dfb052f477380608d59d32b4ab9/files/ \
  -u "MY_API_KEY": \
  -X POST \
  -F file=@mysourcemap.js.map \
  -F name="http://example.com/mysourcemap.js.map"
{ "dateCreated": "2015-03-06T04:53:00.308Z", "headers": { "Content-Type": "application/octet-stream" }, "id": "1", "name": "http://example.com/app.js.map", "sha1": "22591348ed129fe016c535654f6493737f0f9df6", "size": 452 }
I have already created a release and I have created an API key and I have entered the correct organization_slug and project_slug. However when I run the command from the terminal I get the following

scripts $sh sentry_upload_sourcemap.sh 

{"detail": ""}sentry_upload_sourcemap.sh: line 7: dateCreated:: command not found

sentry_upload_sourcemap.sh: line 8: headers:: command not found

sentry_upload_sourcemap.sh: line 9: Content-Type:: command not found

sentry_upload_sourcemap.sh: line 10: },: command not found

sentry_upload_sourcemap.sh: line 11: id:: command not found

sentry_upload_sourcemap.sh: line 12: sha1:: command not found

sentry_upload_sourcemap.sh: line 13: size:: command not found

I'm sure I am misreading the docs but I can't figure it out. Any help would be much appreciated!
Thanks

brien...@bernie.ai

unread,
Apr 27, 2016, 8:43:21 PM4/27/16
to sentry
My own fault, misread the API docs. The second part is the actual response from the curl command, I thought it was the data I was supposed to include, whoops! :

James Gillmore

unread,
Sep 29, 2016, 8:15:34 PM9/29/16
to sentry
what was the code that worked for you eventually? 


On Wednesday, April 27, 2016 at 10:50:51 AM UTC-7, Brien Crean wrote:

brien...@bernie.ai

unread,
Sep 29, 2016, 9:10:11 PM9/29/16
to sentry
To upload the artifacts? This is what I used to upload the files

//Post Files
  -u "api-key-here": \
  -X POST \
  -F file=@main.jsbundle

Reply all
Reply to author
Forward
0 new messages