<TC01>
hm. the first few of those solutions don't actually seem to work, but running chmod -R a+w does. I... guess I'll go with that :/
isd has quit [Quit: Leaving.]
asheesh has quit [Ping timeout: 264 seconds]
mnutt has joined #sandstorm
jemc has joined #sandstorm
amyers has joined #sandstorm
amyers has quit [Ping timeout: 250 seconds]
asheesh has joined #sandstorm
<asheesh>
Whoa, I left the channel by accident! Oops or something.
admine_ has quit [Read error: Connection reset by peer]
<TC01>
so I'm able to build a spk now :) said spk works when I install it into a vagrant-spk VM (that is, vagrant-spk setupvm -> vagrant-spk up -> install SPK through web interface -> run app), but fails when I upload it to a "real" (production) sandstorm server
<TC01>
more specifically, what seems to fail is the redirect from flask to the java app, so I'm wondering if I'm doing that incorrectly?
<dwrensha>
TC01: is it possible that you've hardcoded http:// into some URLs that would need to be https:// on a prod server?
<dwrensha>
(just a wild guess)
<TC01>
dwrensha: ooh. that is entirely possible!
<TC01>
one of the ways I attempted to redirect was returning (from flask) a redirect("http://...") so, that obviously wouldn't work
<TC01>
hm.
isd has joined #sandstorm
<TC01>
Having the python code return a redirect("/legends") does not seem to work either (but, again, works fine from vagrant-spk)...
<dwrensha>
what does the failure look like? does your browser console show any error?
<TC01>
the file uploads, and then it just returns to the upload page; exactly as it was before pressing the button to upload
<TC01>
there are two httpd messages in the console: one saying that apr_sockaddr_get_info() failed for sandbox and another complaining I didn't set ServerName in the config so 127.0.0.1 is being used
<dwrensha>
this reminds me of a WordPress issue I had where uploads would fail in dev mode only
<dwrensha>
right, so in `spk dev` and on Oasis, /var/ is owned by a different UID than the rest of /
<TC01>
well, the upload itself succeeds: I'm poking around the grain's files on the server to confirm that
<TC01>
is that not the case on production grains?
<dwrensha>
another thing that can cause dev to behave differently from prod is if there are some essential files that are stat()ed but not opened, causing spk dev to not detect that they should be included
<TC01>
So, I thought that might be the case
<TC01>
So I created an entirely different vagrant-spk project using Debian instead of Fedora
<TC01>
and uploaded my SPK to that
<TC01>
and it also worked :/
<dwrensha>
yeah, sounds like it's not a UID thing
<dwrensha>
nor a file include thing
<TC01>
I'm pretty sure it's something to do with the reverse proxying, or more specifically, redirecting from inside one reverse proxy'd app to another. but I'm not really sure how to debug that further
Isla_de_Muerte has joined #sandstorm
NwS has quit [Ping timeout: 260 seconds]
<asheesh>
TC01: You have a reverse proxy involved, yeah? Nginx in the grain or something?
<asheesh>
I think I have some magic config for you.
<TC01>
asheesh: I do; I'm using apache, but could easily switch to nginx :)
<asheesh>
Do you have a grain URL (or sharing link) you can send me?
<asheesh>
Interesting; I know of 0 other apps that embed Apache fwiw, but that's fine.
<TC01>
sure, one sec
<asheesh>
Yay
<TC01>
(I default to apache because I always *think* I know how to configure it and I'm less experienced with nginx, and then I always seem to run into some apparently intractable problem like this... perhaps one day, I will learn)
<asheesh>
RequestHeader set X-Forwarded-Proto 'https' env=HTTPS
<asheesh>
If you use those two lines, maybe the right thing will happen?
<TC01>
let's find out!
<asheesh>
: )
<asheesh>
Also looks like you can maybe do
<asheesh>
RequestHeader set X-ForwardedProto "%{HTTP_X_FORWARDED_PROTO}"
<isd>
So, I'm back to trying to wrap websession in something that looks like the standard go http package's handlers, and having touble rigging up the initial session.
<asheesh>
"method not implemented"... I guess the question is, which method?
<isd>
That interface ID is from APIsession
<asheesh>
There's some subclassing stuff for APIsession and websession.
<isd>
Yeah, it's the one extra thing in params
<isd>
so I'm handing it a websession, and I assume it's actually expecting the whole business
<isd>
but, the ApiSession interface doesn't actually specify any extra methods. That thing it's complaining amount is a member of a struct that's defined inside it
<isd>
Probably I'm just casting it the wrong way or something.
<asheesh>
isd: I'm afraid I am out of my depth for right now on that.
<isd>
I have a hunch.
<asheesh>
Keep me posted TC01. FWIW you could also look at the Sandstorm-specific HTTP headers and use that to "hint" flask but if you can fix it in Apache then that is the best.
<TC01>
asheesh: will do. I think I'm off to bed, but I'll take another look in the morning. thanks for all the help!
<isd>
Yeah, this is more of a capnp issue. I have a rough sense of what's happening; I think the go lib is just not reporting the interface ID. There's some awkwardness binding capnp interfaces to Go interfaces, because Go doesn't expect you to declare the interface, it just... has the methods.
<isd>
Capnp is actually substantially more annoying to work with than most other-language libs I've touched.
<synchrone>
be sure you're logged in to alpha.sandstorm.io
<synchrone>
otherwise you can't submit new apps
<mrshu>
hanks synchrone
<mrshu>
synchrone: is that link actually still relevant?
<mrshu>
synchrone: there does not seem to be much happening there (but it might be just my wrong impression)
<synchrone>
this was the "official" link
<mrshu>
synchrone: ok, thanks a ton again
<synchrone>
although sandstorm devs do not actually port the apps themselves
<synchrone>
so it's more for the community to be guided by
mnutt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<TC01>
asheesh: got it to work! the SetEnvIf/RequestHeader lines you pasted, combined with setting "app.wsgi_app = ProxyFix(app.wsgi_app)" in flask, made it do the right thing
Lionel_Debroux has quit [Ping timeout: 276 seconds]
<mnutt>
another thing that would be really helpful to know is what sorts of browsers people use who are using sandstorm. for instance, the file upload capability in davros is kind of a mess because it is supporting upload via html5, flash, and silverlight. I'd love to replace it with html5-only code that's much cleaner but am wary of just dropping support without knowing if anyone is using it or not
<zarvox>
mnutt: The oldest MS browser that Sandstorm supports is IE11. I'm not sure what the precise numbers are, but I'm pretty sure you can assume a reasonably modern Chrome or Firefox for all but a very long tail of usage.
<mnutt>
wow, nice. pretty sure they all have html5 support then
<zarvox>
Yeah. http://caniuse.com/#feat=fileapi suggests that you should be able to count on FileReader existing
<zarvox>
though IE11 is missing FileReader.readAsBinaryString()
mnutt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mnutt has joined #sandstorm
Telesight has quit [Quit: Leaving.]
xet7_ has joined #sandstorm
xet7 has quit [Quit: Leaving]
mnutt has quit [Read error: Connection reset by peer]
isd has joined #sandstorm
sarahsharp has joined #sandstorm
<sarahsharp>
hey asheesh: is there any chance someone could package CiviCRM for sandstorm.io? I would love to try it out for Outreachy.
jemc has quit [Ping timeout: 240 seconds]
jemc has joined #sandstorm
xet7_ has quit [Read error: Connection reset by peer]