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?
Ahh I fixed that issue by reordering the cookies but still couldn't get the mobile apps working.
How did you do that?
C:Users\USERNAME.ionic\cookies.data needs to have the csrftoken cookie first. I am sure they will fix that soon.
Linux is /home/USER/.ionic/cookies.data
Now its working :) now we just have to wait for the new app so we can login
I deleted the csrftoken cookies and logged back in again.
It works
Well…
I got an update today but am still getting an error (Different now)
Error upload response: SyntaxError: Unexpected token < (CLI v1.2.8)
Tried @andymac4182 and @BarryReid comment
Am guessing Apple should respond tomorrow (7 day period to authorise the app)
@mlynch any update on the app?
New app is out but i get a 500 error
@andymac4182 same problem here… I went to Settings -> Clear App Data… it asked me to log in again. After That I uploaded the app again and voila!
Although I can see the app now on my list; when I try and access the appI get a _Ionic_ loading screen and then brings me back to my apps list.
When I try and sync to latest it gives me a 403 Error
Morale of the story… I still cant see my apps on my phone
Running iOS 8.1 iPhone 5
Almost there ;)
Same problem here
I'm getting this error now:
Error upload response: SyntaxError: Unexpected token < (CLI v1.2.8)
Is this an unexpected token my end that I can change?
@jackcutting if you read the above thread it will tell you how to fix that issue.
Does anyone have this working as yet? I am still having no luck but wanted to make sure it wasn't just me.
@james-andrewsmith same here
I experienced the same issue:
Error upload response: SyntaxError: Unexpected token < (CLI v1.2.8)
In my case, the self provided "app_id" when I created the project was the problem. Actually the ionic API responded with a (unparseable JSON, therefore the SyntaxError above):
The requested URL /api/v1/app/upload/APP_ID was not found on this server.
To solve this, I created a new project without any additional configuration and uploaded this:
ionic start test; cd test; ionic upload
After this was successfull, I just took the APP_ID from this test project (ionic.project) and put it into the ionic.project file of the project I originally tried to upload.
Yes, app_id should not be filled in unless it is a real one. We need to
document/fix this
On Mon, Nov 17, 2014 at 2:14 AM, Martin Mrvka [email protected]
wrote:
I experienced the same issue:
Error upload response: SyntaxError: Unexpected token < (CLI v1.2.8)In my case, the self provided "app_id" when I created the project was the
problem. Actually the ionic API responded with a (unparseable JSON,
therefore the SyntaxError above):
The requested URL /api/v1/app/upload/APP_ID was not found on this server.To solve this, I created a new project without any additional
configuration and uploaded this:
ionic start test; cd test; ionic uploadAfter this was successfull, I just took the APP_ID from this test project
(ionic.project) and put it into the ionic.project file of the project I
originally tried to upload.—
Reply to this email directly or view it on GitHub
https://github.com/driftyco/ionic-cli/issues/115#issuecomment-63271787.
Max Lynch
CEO and Co-founder
http://ionicframework.com/
Also kinda same issue here, except my app_id was empty
"app_id": ""
Error upload response: SyntaxError: Unexpected token < (CLI v1.2.8)
Edit:
Oh wait. Still have the issue after inserting app_id from a new dummy project. Guess I have something else disturbing the parser.
Also tried inserting app_id from the dummy project i created, still getting the same error
Error upload response: SyntaxError: Unexpected token < (CLI v1.2.14)
same issue here, i do have app_id in ionic.project
ionic info
Your system information:
OS: Mac OS X Yosemite
Node Version: v0.10.34
Cordova CLI: 4.1.2
Ionic CLI Version: 1.3.2
Xcode version: Xcode 6.1.1 Build version 6A2008a
ios-sim version: 3.1.1
@softBarbarian @Haruhi999 @michaelkrog are you all still experiencing this issue with the latest CLI version, 1.3.11?
@jbavari I had this problem, I updated to the latest CLI version (1.3.11) and it seems I don't have that Error upload response: SyntaxError: Unexpected token problem anymore.
But I get Error packaging project, please try again later every time I tried to package the project.
@jbavari Same here on a new app.
$ ionic start appName creator:c5d7cbe3
[lots of text]
* Package an app using Ionic package service: ionic package <MODE> <PLATFORM>
[ok, I'll try it]
$ ionic package debug android
Loading appName...
Uploading app...
Successfully uploaded (be773c72)
android debug building...
Error packaging project, please try again later
Note: after making the app, I had to manually npm install && gulp install to get dependencies loaded.
@jbavari @amir-s @MichaelJCole Im following the getting started, and I can build the 'sidemenu' into my android phone with no problem, but when I try to 'ionic package debug ios' all I can get is:
Error packaging project, please try again later
@murilolobato Me too :-) I think it's either under construction or abandoned... If it's not, post back!
Hey guys - an update.
The package feature is still being worked on internally by the team. I'll keep you all posted when its completed.
I'm having the same problem.
I created a new project:
ionic start packager tabs
cd packager
ionic upload
//Everything works fine up until this point.
ionic package debug android
Print out:
Loading packager...
Uploading app...
Successfully uploaded ([projectid])
Share your beautiful app with someone:
$ ionic share EMAIL
android debug building...
Error packaging project, please try again later
Probably just that the feature is still in development, but can someone update this when it is ready?
+1 What is the deal with this ?
Also curious about this one. Different error for me.
App "app_id": "" is empty in ionic.project and was working with fresh install.
✗ name: <ul class="errorlist"><li>This field is required.</li></ul>
Unable to upload app (CLI v1.3.19)
Getting errors as well.
Uploading app...
✗ App d44ce385 not found
Unable to upload app (CLI v1.3.19)
Your system information:
OS: Mac OS X Yosemite
Node Version: v0.12.2
Cordova CLI: 4.3.0
Ionic CLI Version: 1.3.19
Xcode version: Xcode 6.2 Build version 6C131e
ios-sim version: 3.1.1
ios-deploy version: 1.4.0
I've the same problem of @ckahle33 .
It's possible that the error is generate when we try to upload an existing project and not a blank or just created project?
Possibly. For now I am going the ad hoc route via OTA for beta distribution. Later today or tomorrw I will change the app_id and let you know if that works for me.
I have the same problem.And how to deal with it?
Loading myApp...
Uploading app...
Successfully uploaded (1ee97e25)
Share your beautiful app with someone:
$ ionic share EMAIL
android debug building...
Error packaging project, please try again later
Same here.
android release building... Error packaging project, please try again later
The same:
Your system information:
OS: Distributor ID: Ubuntu Description: Ubuntu 14.04.2 LTS
Node Version: v0.10.38
Cordova CLI: 4.3.0
Ionic CLI Version: 1.3.22
Uploading app...
Successfully uploaded (e8b405c7)
Share your beautiful app with someone:
$ ionic share EMAIL
android debug building...
Error packaging project, please try again later
found a workaround for packaging locally: http://ionicframework.com/docs/guide/publishing.html
Thanks for opening the issue. It seems that issue has been resolved. I am going to close this issue but please feel free to reopen another issue if this occurs again.
Hi, I'm playing with your official sample "cutePuppyPics";
And I upload successfully.
While I keep getting Size: "NAN UNDEFINED" on the Ionic View App, and cannot view it.
I also tried all steps in documents.
Please help out about where is wrong and save my life.
Thanks so much.
It seems this bug has come back.
I'm getting this issue this morning. Can you plz help resolve this.
to me either..
Nobody who can solve this problem? I got this problem today...
We are facing the same issue now... Started an hour ago. We can login but can't upload
Same problem here :(
We are looking into this as we speak to fix
Same here, Good luck!
Hey everyone, this has just been fixed. To be sure, run ionic login again to re-login to refresh the sessions. We had made some server side changes to cookies/session data that impacted the CLI.
@mlynch
Thanks..... It is working fine here. I knew it was a temporary server issue.
@mlynch you save my life dude <3
You rock!
thnx so much Matt & Team yaaaayyyy!
@mlynch thanks for the tip
Most helpful comment
Hey everyone, this has just been fixed. To be sure, run
ionic loginagain to re-login to refresh the sessions. We had made some server side changes to cookies/session data that impacted the CLI.