Hi all, I’m a TADS newbie, and I’m trying to compile my game for Web play. Going by the System Manual (tads.org/t3doc/doc/sysman/webui.htm), I’ve made a separate t3m file:
I’ve now set up an OS X 10.9.3 installation. I can’t reproduce the issue. Your game builds correctly, including the web version, and everything is working just fine :-/
Maybe somehow the FrobTADS installation is broken. Try installing again. I assume you’re using the official OS X installer from here:
I just reinstalled FrobTADS, after removing /usr/local/share/frobtads. Still getting the same “error copying resource file” message. Do you have any theories about what the actual error that it’s running into might be?
Oh, hey! When I run t3make with the -d option, it works! But, now when I run the generated .t3 file with frob, it says “Network error: prohibited network access”. But hm, I did include tadsnet. Any ideas what I should look into next?
It certainly reminds me of this problem I’ve reported in the past, but it should be resolved in your version of FrobTADS: http://bugdb.tads.org/view.php?id=164. Hm, I have no idea. I’ve also tried your game (on linux) and it bulit successfully and run well. Are library files really under /usr/local/share/frobtads/tads3/lib/webuires and do they have correct access rights?
When you build in debug mode (-d switch), then no resources would be included in the binary image file and they will be read directly from the filesystem in the runtime. Maybe it would be interesting run the game in debug and see whatever there are some issues with resource loading at runtime. If you are getting error messages about prohibited network access, you probably didn’t allowed frob to open network communication with -N switch. Try the following and then you should probably fine-tune the access to minimum required (don’t know from my head exactly, but one of those digits controls listening rights and the other outgoing communication).
I think that blank page could be result of not loading and thus not serving resource files such as html layout and client side javascripts. Firebug extension into a firefox browser (or similar extensions for other browsers) can show network tab, where you can see what files are requested from the server and whetever they are served successfully or 404 (or similar) error is returned instead.
If this is the case, it indicates some general problem reading resource files by frobtads - not only by compiler when bundling into resulting binary, but also at runtime.
bash-3.2$ ls -ld /usr
drwxr-xr-x@ 13 root wheel 442 Jan 11 12:42 /usr/
bash-3.2$ ls -ld /usr/local
drwxrwxr-x 19 root admin 646 May 5 17:53 /usr/local/
bash-3.2$ ls -ld /usr/local/bin
drwxr-xr-x 111 dorleans admin 3774 Jun 6 22:01 /usr/local/bin/
bash-3.2$ ls -ld /usr/local/share
drwxr-xr-x 13 dorleans admin 442 Jun 6 22:01 /usr/local/share/
bash-3.2$ ls -ld /usr/local/share/frobtads
drwxr-xr-x 4 root wheel 136 Jun 6 22:01 /usr/local/share/frobtads/
bash-3.2$ ls -ld /usr/local/share/frobtads/tads3
drwxr-xr-x 6 root wheel 204 Jun 6 22:01 /usr/local/share/frobtads/tads3/
bash-3.2$ ls -ld /usr/local/share/frobtads/tads3/lib
drwxr-xr-x 18 root wheel 612 May 18 2013 /usr/local/share/frobtads/tads3/lib/
bash-3.2$ ls -ld /usr/local/share/frobtads/tads3/lib/webuires
drwxr-xr-x 39 root wheel 1326 May 18 2013 /usr/local/share/frobtads/tads3/lib/webuires/
With the debug build, I get the same behavior whether I have the firewall turned on or off (I don’t think that should affect localhost URLs).
Thanks for the reminder to use the browser debugger: the blank page turns out to be a 404 error.
Looking at the frobtads source code, it sure seems to me like it’s trying to copy a file but it’s being given a directory: github.com/realnc/frobtads/blob … n.cpp#L382
It seems to be getting the list of resource files from webui.tl: github.com/realnc/frobtads/blob … b/webui.tl
but that only lists the directory. I don’t see any code that turns that “resource: webuires” line into a list of the files in that directory before it gets to add_resources, but I’m totally new to this code base so I’m sure I’m missing something…
On a lark, I tried replacing the “resource: webuires” line in webuires.tl with “resource: webuires/main.htm”, and it successfully linked! And I was able to connect to the server and got a non-blank error page (which is to be expected since I didn’t include all the resources).
Update: I’ve now added all the files in webuires as resource declarations, and I’m able to compile and play my game in web mode! This is enough to get me going on updating the game for web play, though I’m still pretty curious about what’s going wrong… Let me know if you need any more information to help diagnose it.
Copying the webuires directory to the current directory works. However, if I chown the directory to root, it stops working, even though the directory is world-readable. This is also true if I chown it to other users, like nobody or mysql. Seems like it only works if the directory is owned by me.