ionic upload 403 error
As described on the forum (http://forum.ionicframework.com/t/forbidden-upload-during-ionic-package/9712)
There appears to be an error with the upload process.
Not sure if it's relevant but I found the ionic.project file has a blank app_id (even when specified on start), judging by the code that could be causing the URL created to have some issues?
Not sure what a valid app_id looks like so I couldn't test a manual fix.
Also getting this; furthermore, logging into the forums fails with 'Unknown Error', so I can't really report it there.
$ ionic upload
Uploading app...
Forbidden upload (403) (CLI v1.2.5)
Digging into this a bit more, it appears the 403 is related to Django's CSRF protection.
The response contains:
<h1>Forbidden <span>(403)</span></h1>
<p>CSRF verification failed. Request aborted.</p>
...
<p>Reason given for failure:</p>
<pre>
CSRF token missing or incorrect.
</pre>
Looking into this even further, the CLI script appears to reference the first cookie in the ~/.ionic/cookies.data cache which in my case was pointing to a CloudFlare cookie (__cfduid) instead of the csrfmiddlewaretoken cookie the script was expecting.
The same code appears in the package script as well.
Nuking the __cfduid cooke from the cache seemed to get me past the 403 error, but now the response is:
{"errors": ["\"'note'\""], "new_app": true}
Adding "form.append('note', 'project note');" gets me past the note error. I am now getting
{ errors: [ 'null value in column "app_file" violates not-null constraint\nDETAI
L: Failing row contains (690, null, 2014-09-28 00:57:34.076137+00, 2014-09-28 0
0:57:34.076167+00, Testingasdf23409asdf, 447ef0b1, 5433, testingasdf23409asdf).
n' ],
new_app: true }
I get the same error:
$ ionic upload Uploading app... Forbidden upload (403) (CLI v1.2.5)
Also with clean install of app ($ ionic start ...)
This was also reported on the forum: http://forum.ionicframework.com/t/forbidden-upload-during-ionic-package/9712/5
Stay tuned, this is a hidden thing we pulled for the short term and will be relaunching soon!
On Mon, Sep 29, 2014 at 11:06 AM, nhunsaker [email protected] wrote:
This was also reported on the forum: http://forum.ionicframework.com/t/forbidden-upload-during-ionic-package/9712/5
— Reply to this email directly or view it on GitHub https://github.com/driftyco/ionic-cli/issues/115#issuecomment-57184612.
Max Lynch CEO and Co-founder http://ionicframework.com/
@mlynch is there any ETA?
How soon? I was looking to recommend this to replace Telerik Appbuilder for some of our applications and a good way to prototype internal apps.
Yes please how soon?, sorry for the presure :-)
Yes please how soon?, sorry for the presure :-)
We should have this fixed early next week, just finishing up some changes!
Great news :) Can't wait to give it a go.
Got an update today…
At least the error has changed now…
Uploading app...
Error upload response: SyntaxError: Unexpected token < (CLI v1.2.7)
Hey Martin,
We are putting the finishing touches on a ton of stuff right now, things will be working in the near future!
On Oct 4, 2014, at 12:13 AM, Martin Moscosa [email protected] wrote:
Got an update today…
At least the error has changed now…
Uploading app... Error upload response: SyntaxError: Unexpected token < (CLI v1.2.7) — Reply to this email directly or view it on GitHub.
Hey @mlynch
I can see the progress and am becoming a big advocate of your product and always eager to see new features!
I am indeed much excited about this functionality working already
Kudos
Seems to be working now :)
Still not working for me, I'm still getting : Forbidden upload (403) (CLI v1.2.7)
New app is under review. We will announce when it's available for everyone
On Sat, Oct 11, 2014 at 4:58 PM, Barry Reid [email protected] wrote:
Still not working for me, I'm still getting : Forbidden upload (403) (CLI v1.2.7)
— Reply to this email directly or view it on GitHub https://github.com/driftyco/ionic-cli/issues/115#issuecomment-58768821.
Max Lynch CEO and Co-founder http://ionicframework.com/
OK great, so I take it the Forbidden upload (403) message will go away once the app is released by apple and you turn the servers on on your end?