Jump to content

"Upload-Error" when Download


rottifant

Recommended Posts

I built cartridge with URWIGO. Now I uploaded it on Wherigo.com but when I want to download it I get the error:

 

 

Error During Upload

System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> Exception of type 'System.ApplicationException' was thrown. at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) at Wherigo.GSPCartridgeService.CartridgeService.GetCompiledCartridgeWithMetaData(GWZMetaData gwzMetaData, String CartridgeFileName, String CartridgeId, Int64 PlayerId, String PlayerName, DeviceType deviceType, String CompletionCode) at cartridge_download.btnDownload_Click(Object sender, EventArgs e)

 

What can I do? When I compiled via Wherigo.com, it worked fine (I tested the cartridge in "reallife")...
 

Link to comment

 

I got probably the same error message but couldn't solve the issue. 

 

Quote

 

Error During Upload

System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> Exception of type 'System.ApplicationException' was thrown. at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) at Wherigo.GSPCartridgeService.CartridgeService.GetCompiledCartridgeWithMetaData(GWZMetaData gwzMetaData, String CartridgeFileName, String CartridgeId, Int64 PlayerId, String PlayerName, DeviceType deviceType, String CompletionCode) at cartridge_download.btnDownload_Click(Object sender, EventArgs e)

 

 

I built a cartridge with Urwigo and added some LUA code and function. If I do upload another .gwz file without any user code, the download works.

So I removed all of the LUA code - and the download worked. So I tried step by step, adding different parts of the code, and it stopped working again. If there's any LUA code left, that is a function, it doesn't work anymore.

Using the online compiler with all of the code returns a fully working cartride. That's quite frustrating. 

 

Edited by kiwiflip
misspellings
Link to comment
4 hours ago, kiwiflip said:

 

I got probably the same error message but couldn't solve the issue. 

 

 

I built a cartridge with Urwigo and added some LUA code and function. If I do upload another .gwz file without any user code, the download works.

So I removed all of the LUA code - and the download worked. So I tried step by step, adding different parts of the code, and it stopped working again. If there's any LUA code left, that is a function, it doesn't work anymore.

Using the online compiler with all of the code returns a fully working cartride. That's quite frustrating. 

 

 

What does your user code look like? (if you don't mind sharing.)

Link to comment

Hi Hügh,

 

thanks for your reply!

I've uploaded the code as .txt file - feel free to have a look into that. 
 

(see pic )
 

The cartridge is a kind of a trip simulator. The player has to check the connections at the "flight table" (item) and then s/he has to chose one of 3 (item) to board a plane. The available connections depend on the location (variable). The flights are defined in an array. The times for boarding, departure, arrival are calculated by the informations given in the array.

There are a lot of functions used to calculate the date and times shown. 

 

I've found some threads in the forum refering to a HTML related issue, but I'm pretty sure, I haven't used html tags - as I deleted all of the code except for the first funtion and still it didn't work. It seems like it stopped working, as soon as I use any function. 

 

----

edit: link to the dropbox file removed, instead added a pic with the code lines mentioned to shorten things up and prevent from getting lost due to termination of external webspace. 

cartridge source code.png

Edited by kiwiflip
preventing data due to webspace termination.
Link to comment

@kiwiflip

 

Hmm. Nothing really jumps out as me; it might just be some (undocumented) quirk of the Lua compiler that Groundspeak is using. Here were a few of my thoughts as I skimmed through.

  • Semicolons. I can't imagine that this would be what is causing issues but perhaps the parser isn't expecting semicolons after things that aren't statements (expressions?), ie. "end;" on line 85.
  • Empty forward-declarations. Are you a C programmer? Your forward-declarations that are indented one tab back is very... K&R. Again, I can't imagine that an empty forward declaration (line 82) is what's causing issues. But perhaps.
  • Class methods. On line 91 you use "vstr:match" to call the str class' match method. I'm convinced that I've seen other cartridges do this too, but writing it as "str.match(vstr, ...)" might be better.
  • Multiple assignment. On line 129 you assign multiple variables to the result of a function call. I believe that this is valid syntax, but the Groundspeak compiler may not like it.
  • Table keys. You use a table with keys (sec, min, hour, day, month, year) to represent time. I notice that you access these fields using a dot (ie. tm.hour) instead of an index (ie. tm['hour']). I believe that this is valid syntax but perhaps the Groundspeak compiler doesn't like it.
  • Multi-line strings. You use "[[ \n ]]" between lines 506 and 507 to get a newline. I think that that'll work but I seem to recall having bad experiences with multi-line strings and the compiler.

Hopefully the issue is with one of those...

Link to comment

@Hügh thanks a lot for the support! 

I got a working up- and download now after trying different of these ideas.

Here's my summary to this - for the documentation (and every other fellow help seeker) 

  • the wig.com-compiler doesn't like the semicolons (got the use of these from several lua tutorials) 
  • vstr:match('..') works as well as string.match(vstr,'..')
  • table keys work, as well as indices: tm.hour and tm.['hour']
  • multi-line strings: works for strings, but doesn't work for multi-line comments.  ie.  --[[ .. .. .. ]]--  (had some additional concept related comments in the cartridge) 
  • multiple assignment for string.match works. didn't see another way in combination with string.match
  • empty forward declaration: works

None of this was an issue with the URWIGO compiler or the original WIG compile page linked at the GWZ file upload page.

The upload to the WIG page "worked" as well, just the download revealed the upload error.

 

- - - -

And to your question: no, I am not a programmer at all - professionally speaking. But I have had and still have fun now and then dealing with this kind of projects (and if I got some spare time). Starting with Turbo Pascal 4.0 decades ago, I either do this to be able to automate annoying repetitions at work or like here just for the lulz.

Hopefully that's it ... and the way is clear for a new cache.

I'm very happy, so thank you again

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...