I have a web app (stand alone) that’s running with SSL. Works great, but I recently had a user try to upload a file into the app using iOS (I’m not sure the file uploader even makes sense in iOS, but…)
The app crashes as follows:
2015-02-26 08:18:35] session E69320718C3E3C4E6D2C81DBE4AB7AEB opened from 166.170.xx.xx browser: Mozilla/5.0 (iPhone; CPU iPhone OS 8_1_3 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12B466 Safari/600.1.4
[2015-02-26 08:19:17] user024 login session E69320718C3E3C4E6D2C81DBE4AB7AEB
[2015-02-26 08:19:30] user024 selected upload
[2015-02-26 08:19:30] App.UnhandledException (none) 0 : rbframework.dylib$1536
memorySetString
MemoryBlock.=StringValue%%o<MemoryBlock>i4i4s
_WebMemoryBuffer.Write%%o<_WebMemoryBuffer>s
HTTPServer.HTTPRequestSocket.Event_DataAvailable%%o<HTTPServer.HTTPRequestSocket>
RBSSL.xojo_plugin_0.dylib$95
RBSSL.xojo_plugin_0.dylib$94
RBSSL.xojo_plugin_0.dylib$92
RBSSL.xojo_plugin_0.dylib$82
RBSSL.xojo_plugin_0.dylib$52
RBSSL.xojo_plugin_0.dylib$61
SSLSocket._Poll%%o<SSLSocket>
HTTPServer.HTTPRequestSocket._Poll%%o<HTTPServer.HTTPRequestSocket>
rbframework.dylib$3845
rbframework.dylib$512
rbframework.dylib$3329
rbframework.dylib$3328
RuntimeDoEvents
ConsoleApplication.DoEvents%%o<ConsoleApplication>i4
WebApplication.Event_Run%i4%o<WebApplication>A1s
rbframework.dylib$651
Delegate.Invoke%%
ConsoleApplication._CallFunctionWithExceptionHandling%%o<ConsoleApplication>p
rbframework.dylib$3327
RuntimeRun
REALbasic._RuntimeRun
_Main
main
You could use “Run Paused” to build the app and then go run it from the command line and specify your ssl certificate and all that. You’d at least be able to try it out.
Update: I did get it working, I forgot that each time I do Run Paused the .crt files are deleted.
So I’ve tested it in the IDE using an iPhone, and I do see these messages in Terminal:
WARNING: Using Session inside Session may lead to obscure bugs. You should instead use Self.
Session closed. There are 2 sessions remaining.
Session closed. There is 1 session remaining.
Warning: WebControl.Close cannot be used on design-time controls. See the documentation for more details.
But I can’t get it to crash like it did before.
I do see where I’m using “session.” inside a Session event handler, and will fix that. The other message about “web control.close” is not making sense to me, since I don’t call .Close anywhere in the app (other than WebPage.Close in a few places).