wit icon indicating copy to clipboard operation
wit copied to clipboard

500 when importing .zip file

Open maxim-isakov-ross opened this issue 9 years ago • 26 comments

For the description of this issue I am going to copy a description from a stackoverflow post that was not asked by me but the issues is one in the same:

"I have a working Wit.Ai application, and want to export, then import it into another Wit.Ai account. I exported the application into a zip file. And there comes trouble: When trying to import the file back into the new account: "We are creating your instance. Please do not refresh" is displayed for several minutes, then, dissapears, without any success or failure message. And no new project is created...

The project I'm trying to import is not huge at all; the .zip file is 3KB, and, got only 4 files in the entities directory."

original post: http://stackoverflow.com/questions/42279826/wit-ai-the-screen-is-stalled-while-importing-application

maxim-isakov-ross avatar Feb 24 '17 23:02 maxim-isakov-ross

Similar issue here. We tried to upload a zip (with an extended expressions.js-file so as to provide more training data to wit.ai). After uploading the zip, the app was created after some minutes of waiting. We then downloaded the zip-backup to check if everything was imported and noticed that only a part of the expressions.js-file was imported. How can this issue be fixed? Unfortunately, not being able to import backup-data seriously limits the usefulness of wit.ai for us…

jfrehner avatar Mar 09 '17 15:03 jfrehner

Having the same issue, though with a big app and the files are modified by me before reimporting - so it might me my fault. But the app appears to import without an error message. If I go look at the import then the entities were imported correctly, but many of the stories are missing. I've emailed the file I'm trying to import to Willy and Laurent. It would be great if the import system was more verbose.

hactar avatar Mar 13 '17 17:03 hactar

Facing the same problem, I exported my app, then deleted it from my account, then while creating the same app again I imported the downloaded zip and its stuck at "We are creating your instance. Please do not refresh".

swapkh91 avatar Mar 17 '17 11:03 swapkh91

I experienced the same problem. It seems that the server returns an error after a couple of minutes and only processes the data during that time. I get error code 500 (Internal Server Error) with the error message "Something went wrong. We've been notified."

AndreasGassmann avatar Mar 23 '17 08:03 AndreasGassmann

+1 This is happening with me event with a untouched .zip.

If it helps, I'm getting this log in my console: screen shot 2017-03-29 at 15 30 09

Remembering that I didn't chance the .zip that was created by the web app.

0xLuz avatar Mar 29 '17 18:03 0xLuz

@AndreasGassmann @JoabMendes @swapkh91 @hactar @jfrehner @maximFromThe6ix are you all trying to import legacy apps (without Stories) ? I'll make this ticket a feature request to make the import work for older apps. This is on our roadmap, but with low priority for now.

blandinw avatar Mar 29 '17 18:03 blandinw

I'm trying to import the data from an app with stories, so I wouldn't call it a legacy app

maxim-isakov-ross avatar Mar 29 '17 19:03 maxim-isakov-ross

@blandinw No, this is a stories based app (though I have manipulated the json files to add more stuff, so it may be my fault, but I have no way of knowing as we don't get any feedback on the import). Check your emails, I've just sent two zips I'm trying to import.

hactar avatar Mar 29 '17 19:03 hactar

@blandinw No, it's a recent one and with stories.

0xLuz avatar Mar 29 '17 19:03 0xLuz

Ok, then it is a bug with import, and bumping to hi-pri.

blandinw avatar Mar 29 '17 19:03 blandinw

@blandinw Same here. I exported the project, modified the json, and then uploaded it again.

AndreasGassmann avatar Mar 29 '17 19:03 AndreasGassmann

@AndreasGassmann just checking did you use this zip command?

zip FlowBased_SimpleExample.zip FlowBased_SimpleExample/app.json FlowBased_SimpleExample/entities/*.json FlowBased_SimpleExample/actions.json FlowBased_SimpleExample/stories.json FlowBased_SimpleExample/expressions.json

l5t avatar Mar 29 '17 19:03 l5t

I used the command provided in the app.json. The import "worked", it just didn't import everything (it randomly stops after about 5 minutes giving me an internal error (500)).

AndreasGassmann avatar Mar 29 '17 19:03 AndreasGassmann

@AndreasGassmann how many expressions did you have in your expressions.json?

blandinw avatar Mar 29 '17 19:03 blandinw

I don't know how many expressions there are. The expressions.json file is about 10'000 lines long. I simply exported my app and imported the (untouched) zip file again, getting the following error.

Failed to load resource: the server responded with a status of 504 (Server timeout)
common.fa5a69a….js:58 error while importing SyntaxError: Unexpected token < in JSON at position 0
    at JSON.parse (<anonymous>)
    at XMLHttpRequest.i.onreadystatechange

AndreasGassmann avatar Mar 29 '17 19:03 AndreasGassmann

Same with me. I exported the app and then tried to import the same zip file, untouched and it was stuck at "We are creating your instance. Please do not refresh" for a long time and finally failed.

swapkh91 avatar Mar 29 '17 19:03 swapkh91

Ha. 504 is different than 500. We should import apps in an async way and send an email when the import job is done. It would be useful to have a few zip files that cause the bug. Can some of you send an email with your .zip attached with subject "GitHub issue #381: cannot import" to $my_first_name at fb.com?

blandinw avatar Mar 29 '17 19:03 blandinw

I know that a 504 and 500 error are not the same. Last week I got a 500, just like described above. Today I get a 504 after exactly 2 minutes. I am sure that it took more than 2 minutes last week, so maybe you changed the timeout? 😄 I agree that the importing should be done asynchronously. Maybe you could redirect the user to the new app after the upload completed and show a progress bar until the project has been fully imported?

AndreasGassmann avatar Mar 29 '17 22:03 AndreasGassmann

Indeed, we started using new load balancers with a more aggressive timeout this week :-) We'll implement the async thing, but this is low pri compared to what we're working on. Can I ask how big your .zip file was given that it took 5min to upload? We should probably allow importing values and expressions after an app has been created, to make the initial import more likely to succeed.

blandinw avatar Mar 30 '17 00:03 blandinw

I could make the upload today, but it still threw an error and stuck on the /new page without any message displayed. However, When I loaded the home page the new app was listed there with all the entities that where on my .zip. The log says that the error is something about json parsing, but I had validated all the json files on my .zip using http://jsonlint.com/. So, this error is weird.

This is a screenshot from my log: screen shot 2017-03-29 at 17 29 29

0xLuz avatar Mar 30 '17 01:03 0xLuz