funwhilelost has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<zarvox>
For reasons which are not clear to me, Rocket.Chat under Sandstorm doesn't appear to try to create desktop notifications. The same source code running outside of sandstorm (just "meteor") does.
<zarvox>
Maybe it's an issue with Rocket.Chat when built for production, rather than in debug mode.
<asheesh>
You could try 'meteor deploy' then!!
* zarvox
gives it a shot
bb010g has joined #sandstorm
eternaleye has quit [Ping timeout: 265 seconds]
<zarvox>
Well, that failed, because 'meteor deploy' doesn't support some Mongo things that Rocket.Chat requires. Blah.
<asheesh>
Sorry 'bout that.
<zarvox>
I guess I'll give up on dealing with this for now
simonv3 has quit [Quit: Connection closed for inactivity]
offby1 has joined #sandstorm
<offby1>
Ahoy! This is my first attempt at getting an existing (simple) web service running via sandstorm ... I've gotten to the point where I've typed "vagrant-spk dev", and clicked the icon for my app ... but instead of displaying its one page, it's just "spinning". There's nothing getting dumped to the console ... how do I troubleshoot it?
<offby1>
Got another console and did "vagrant-spk ssh", and am poking around ... don't really know where to look for logs, though
<asheesh>
Hi offby1 !
<asheesh>
First question!
<offby1>
yep
<asheesh>
Have you checked in the JS console?
<offby1>
oh! Never thought of that.
<asheesh>
The app might be doing a HTTP redirect somewhere in a non-allowed way.
<asheesh>
Do also check the computer-ish button at the top, which is the 'grain log'
<offby1>
I've already checked the link you just gave me; didn't notice anything pertinent.
<asheesh>
And BTW I'm so glad you stopped by to ask this question.
<offby1>
ah, "grain log", eh? Sounds useful :)
<asheesh>
(-:
<offby1>
aha: /opt/app/.sandstorm/launcher.sh: line 32: /opt/app/env/bin/initialize_tinyurl_db: No such file or directory
<asheesh>
Ah hah
<offby1>
that might not be the immediate cause, but I obviously gotta fix it. Thanks.
<asheesh>
Sounds like you're working on a Python-based URL shortener perhaps? (-:
<offby1>
who'd'a thunk :)
<offby1>
I call it "hello world for the web"
<offby1>
apparently my hobby these days is seeing how many different platforms I can deploy it on.
<asheesh>
: D
<asheesh>
We were discussing just yesterday here that it'd be nice to have a URL shortener in Sandstorm.
<offby1>
heh
<asheesh>
I have some maybe-good, maybe-bad news for you.
<offby1>
well if I ever get it packaged up, you can use it; it's more or less Open Source (except that I might have forgotten to put an actual license file in it)
<offby1>
is that one of those things that you'll fix at some point?
<asheesh>
So probably the way the best way to make this work (which might be depressing) is to export the database into static HTML files that contain META REFRESH as a pseudo-redirect.
<offby1>
heh
<asheesh>
Yeah -- there's every reason for us to enhance our static publishing feature to include actual redirects.
<asheesh>
I think it's mostly a matter of figuring out the API for it.
<asheesh>
Static files are easy because we can say "put files here, we'll serve them".
<offby1>
I could always tell people to just copy the link and then paste it
<asheesh>
Yeah, that could work too. It's almost nicer actually.
<asheesh>
Presumably you need to add a 'env/bin/pip install -r requirements.txt' thing to the 'build.sh'.
<asheesh>
But then again the uwsgi stack I think does that.
<asheesh>
So maybe you're missing some system dependencies (sudo apt-get build-dep python-lxml!??) and that's breaking the pip install phase.
<offby1>
I think that's already there, yes.
<offby1>
But now I'm wondering if you're doing "python setup.py develop", or "python setup.py install"
<asheesh>
Read the .sandstorm/build.sh in your repo that we generated; I forget, though I can look it up.
<offby1>
I assume my hanging is because of the error that I pasted
<asheesh>
Yeah, presumably your app is breaking in half.
<asheesh>
Feel free to push your .sandstorm directory to a public git repo if you want me to look at it.
<asheesh>
The squeaky wheel gets the grease!
<offby1>
I probably will soon anyway
<offby1>
it sorta looks like nobody ever did "python setup.py develop"
<asheesh>
I recommend you do
<asheesh>
env/bin/pip install -e .
<asheesh>
instead
<asheesh>
Since I'm friends with Donald Stufft and he says to tell that to people.
<asheesh>
Turns out they're equivalent, but the pip-install way monkeypatches the world so you get setuptools' setup() even if you forget to 'from setuptools import setup'.
<asheesh>
So that way you can benefit from new setup() features.
<offby1>
huh, I should ask him (or you) why they recommend that. I've seen it but never do it
<offby1>
oh you just answered.
<offby1>
Well, let's try it!
simonv3 has joined #sandstorm
<offby1>
surprisingly slow ...
<offby1>
wish I was behind a transparent caching proxy, so all these "apt-get"s and "pip install"s would go faster
<offby1>
*whine* *whine*
<offby1>
gaah, when will I learn not to edit a shell script while it's running
<offby1>
OK, trying again.
<offby1>
still hanging ...
<offby1>
ah, known problem: KeyError: 'getpwuid(): uid not found: 1000'
<offby1>
since I've gotten that to work in the past on the plain old command line
<offby1>
"This time for sure"
<offby1>
\o/
<offby1>
~
<offby1>
/ \
<offby1>
OK, so it's working, modulo ``Refused to frame 'http://yadda' because it violates the following Content Security Policy directive: "frame-src 'self' http://*.local.sandstorm.io:6080"''. Thanks!
<asheesh>
Would you be willing to give a lightning talk? : D
<mquandalle>
Hum, didn’t plan anything
<mquandalle>
And I’m not super fluent in speaking english
<asheesh>
Your English seemed fine when we met earlier in the year! But yeah, you don't have to.
<mquandalle>
But I guess I could show some stuff related to Wekan on Sandstorm
<asheesh>
But I figure it'd be nice if the room could know that the Wekan person is there.
<mquandalle>
Actually you are right, I should do a lightning
<asheesh>
So yeah, I leave it to you. Feel free to have your lightning talk be about something that's not even related to Wekan, or feel free to be too busy to do any talk, etc.
<mquandalle>
I will prepare it on my flight :)
<mquandalle>
an I hope we'll get a chance to meet again later during my stay
<asheesh>
Yes, I hope so too and I'm basically sure the answer is yes.
<mquandalle>
I have a ton of interested in Sandstorm as you know ;-)
<asheesh>
(-:
offby1 has left #sandstorm ["ERC (IRC client for Emacs 25.0.50.2)"]
<zarvox>
wow mquandalle that's fantastic! I look forward to meeting you in person!
<mquandalle>
Me too
<mquandalle>
I didn't ping you in my initial message be I really should have pinged everyone in the Sandstorm community :)
bb010g has quit [Quit: Connection closed for inactivity]
rustyrazorblade has quit [Quit: rustyrazorblade]
jadewang has joined #sandstorm
jadewang has quit [Ping timeout: 255 seconds]
mnutt has quit [Quit: mnutt]
NOTevil has joined #sandstorm
mnutt has joined #sandstorm
<dwrensha>
mquandalle: Nice. Looks like I chose a good week for visiting California, then. :)
<mquandalle>
Hey, I thought you lived there!
<mquandalle>
(Anyway from a European point of view everything in the US is not that far :-P)
neynah has joined #sandstorm
jadewang has joined #sandstorm
neynah has quit [Client Quit]
funwhilelost has joined #sandstorm
<ckocagil>
is neynah gone for today?
funwhilelost has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
NOTevil has quit [Quit: ... installing updates ...]
funwhilelost has joined #sandstorm
mnutt has quit [Quit: mnutt]
<zarvox>
ckocagil: she's not at the office yet, but the calendar says she should be in - she's probably in transit
<ckocagil>
thanks zarvox
neynah has joined #sandstorm
<neynah>
Hi ckocagil!
<ckocagil>
hi neynah! I need some icons for an app I ported
decipherstatic has quit [Remote host closed the connection]
NOTevil has quit [Read error: Connection reset by peer]
ash___ has joined #sandstorm
<asheesh>
Hello ash___
<asheesh>
I'm kinda like you!
ash____ has joined #sandstorm
<ash____>
Hi, I'm trying to run prometheus.io on Sandstorm. It's a server (and service) monitoring system. When I've noticed you have Piwik app, I thought Prometheus would also work. But there's a problem.
<ash____>
Prometheus wants to pull metrics from servers it wants to monitor. You configure it by saying which http urls to poll, and it gathers metrics every couple of seconds/minutes.
<ash____>
I've read in the documentation that sandstorm doesn't like apps to go to the internet.
<asheesh>
d'oh hi
<asheesh>
Oh yay hi
<asheesh>
ash____: So I have three answers for you.
<asheesh>
1. It won't work unless you modify the way the app does its HTTP connectivity.
<asheesh>
2. It can actually work straightforwardly! if you are willing to make those modifications, but
<asheesh>
3. The APIs for doing that are going to change eventually into something we call the "Powerbox" APIs but we'll grand-father-in old apps, so you can begin developing now and expect things to keep working.
<asheesh>
(But when we're ready for #3, we might ping you and suggest a change to how you're doing the outbound HTTP calls.)
<asheesh>
So to zoom in on #2:
<ash____>
Ok, thank you!
* ash____
listening
<asheesh>
Sandstorm apps run inside a "grain" with no IP route to the outside world.
<asheesh>
But they do have a "Cap'n Proto RPC" interface that allows them to make connections.
<asheesh>
On HackSessionContext there is a method to do outbound HTTP.
<asheesh>
That sounds complicated to me, but I am under the impression that jparyani has been working on a HTTP proxy tool that does that for you.
<asheesh>
He may be AFK for about an hour at the moment though.
jadewang has quit [Remote host closed the connection]
<asheesh>
Then you'd configure Prometheus to use a HTTP proxy and be sure to start that HTTP proxy within the grain.
<asheesh>
BTW honestly we need something kind of like this.
<asheesh>
For Sandstorm production server monitoring.
<asheesh>
Interestingly it would be "straightfoward" to modify https://github.com/prometheus/client_golang to use the Go-based Cap'n Proto RPC support, if you don't mind writing some code.
<asheesh>
So that's the overview; let me know what you want me to say more about, or any other thoughts you have.
<asheesh>
brb fixing bad links in that doc
<ash____>
Ok, good! (client_golang is about golang applications that you want to monitor, it's not about the monitoring system itself)
<ash____>
I'll try to figure out how to do outbound http via HackSessionContext.
<asheesh>
I'm surprised you consider that understandable! (-: You must care about security, which is unusual among humans.
<ash____>
I guess I've read too much about Sandstorm, and I like its goal :)
<ash____>
When I was watching some Sandstorm talk, I remember hearing something like "we aggresively terminate apps when the user closes the tab".
<ash____>
Will my app be terminated? Prometheus needs to be running in order to pull metrics periodically.
<asheesh>
Oh.
<asheesh>
Right.
<asheesh>
I believe there is a way for an app to request to stay alive.
<asheesh>
I don't know that this is in the docs though.
<asheesh>
src/sandstorm/grain.capnp stayAwake()
<asheesh>
tests/apps/backgrounding.js appears to link to a wakelock demo app
<dwrensha>
yeah, the problem with reading grain.capnp is that many of the interfaces aren't implemented yet. But wakelocks are implemented.
<asheesh>
We'd prefer there were a way to stop the app process and have it wake itself up periodically to do the outbound HTTP gets.
<kentonv>
they don't work yet on Oasis though
<asheesh>
But that API is not defined yet.
<asheesh>
But yeah, you could use wakelock on a self-hosted Sandstorm for now ash____ and revise in the future if you desire.
<ash____>
Oh, nice!
<ash____>
So what you are saying is that stayAwake() call is implemented, but disabled in Oasis, right?
<kentonv>
not disabled
<kentonv>
just not implemented yet on Oasis, which has some differences in the backend
<kentonv>
Oasis schedules apps across a cluster of machines which means things affecting scheduling need to be done differently
<kentonv>
hmm, actually more accurately the problem is that we haven't implemented sturdyrefs on Oasis yet -- it's not actually about scheduling but rather routing.
<kentonv>
the main reason it isn't implemented yet is because nothing is using it yet. It's not very much work, actulaly.
<ash____>
Ok, thank you!
<ash____>
How do I run tests/apps/backgrounding.js?
<ash____>
(on my self-hosted, not-yet-installed Sandstorm)
<asheesh>
It integrates into the build process, so I can't quite advise it.
<asheesh>
You can however manually follow it
<asheesh>
Use wget to download the SPK that is named within there
<asheesh>
Then install it, then look for a button relating to backgrounding
jadewang has quit [Read error: Connection reset by peer]
jadewang_ has quit [Read error: Connection reset by peer]
jadewang has joined #sandstorm
jadewang_ has joined #sandstorm
jadewang has quit [Read error: Connection reset by peer]
mnutt has quit [Quit: mnutt]
<maurer>
kentonv: I'm implementing a canonicity validator, and am wondering:
<maurer>
1.) What happens if there is a capability? Is it simply non-canonical then?
<maurer>
2.) The rules for canonicity seem to say nothing about space in the one segment which is not a part of the value - I assume this is ruled out, but it does not expliticly say so
mnutt has joined #sandstorm
mnutt has quit [Client Quit]
jadewang_ has quit [Remote host closed the connection]
bb010g has quit [Quit: Connection closed for inactivity]
<dwrensha>
maurer: for (2) are you referring to space beyond the end of the message?
<maurer>
No
<maurer>
I'm talking about gaps in the segment
<maurer>
e.g. say I'm validating, and I see a struct with two fields
<maurer>
field 1 points to say, 100, and then uses 24 bytes there to represent the struct
<maurer>
field 2 points to say, 160, and does stuff there
<maurer>
unless I'm missing something in the rules, this is allowed by preorder
<maurer>
but I could just as easily have field 2 point to 159
<maurer>
and this would change the byte representation of the message, so canonicalizing a message wouldn't gaurantee bytewise equality
neynah has joined #sandstorm
<dwrensha>
hm. so maybe the spec for canonicity is not quite tight enough
jadewang has joined #sandstorm
<dwrensha>
I think it's clear that you should rule out the empty space
<dwrensha>
I guess I'm not sure about what the precise definition of "preorder" is
home has quit [Quit: Leaving]
<maurer>
I read preorder as 'dfs the tree; pointer traversal order is sorted'
<maurer>
(in increasing order)
<dwrensha>
for (4), equality of capabilities is a level-4 feature, and has not been implemented yet in any language
<dwrensha>
er, for (1)
pavar234 has joined #sandstorm
<pavar234>
Hi guys. I have a strange issue with CAPNP lists
<pavar234>
I recover an element of a list as:
<pavar234>
#1 0x0000000001edb8f3 in kj::ExceptionCallback::RootExceptionCallback::onFatalException(kj::Exception&&) ()
<pavar234>
#2 0x0000000001edab0d in kj::throwFatalException(kj::Exception&&) ()
<pavar234>
#3 0x0000000001ee14d6 in kj::_::Debug::Fault::fatal() ()
<pavar234>
#4 0x0000000001ebdee2 in capnp::_::ListReader::getStructElement(unsigned int) const ()
<pavar234>
#5 0x000000000043e089 in capnp::List<vproto::nevi::api::state::Branch, (capnp::Kind)3>::Reader::operator[] (this=0x7ffff490d7d0, index=0) at /rootfs/include/capnp/list.h:216
<pavar234>
186 //Loop over all the branches and recover the differences
<pavar234>
187 for(auto it : req.getBranches()){
<pavar234>
but I get this weird error
<pavar234>
branches are correctly initialized, I think
<pavar234>
auto branches = sr.initBranches(1);
<pavar234>
branches[0].setDepth(0);
<pavar234>
auto branches = sr.initBranches(1);
<pavar234>
branches[0].setDepth(0);
<pavar234>
auto res = branches[0].getResource();
<pavar234>
auto res = branches[0].getResource();
<pavar234>
auto branches = sr.initBranches(1);
<pavar234>
branches[0].setDepth(0);
<pavar234>
auto res = branches[0].getResource();
<pavar234>
(ups, sorry for the duplicated copy&paste)
<kentonv>
what did gdb say was the reason for breaking?
<pavar234>
that's the point of failure
<pavar234>
I put a catch throw
<kentonv>
oh
<pavar234>
(catch throw in gdb)
<pavar234>
so immediately after the exception I got the break
<kentonv>
well we'd really like to get at the error text here
<pavar234>
ok
<kentonv>
normally if you let the exception be thrown, and it isn't caught, the error will be printed
<pavar234>
I have a catch all for other reasons in the ioloop
<pavar234>
anyway
<pavar234>
I will compile tomorrow latest HEAD
<pavar234>
with debug
<kentonv>
and that catch doesn't print the message?
<pavar234>
no, not yet
<pavar234>
is there a way to inspect the exception from gdb?
<kentonv>
I'm not sure.
<pavar234>
exceptions in C++ are sometimes dfficult to debug
<kentonv>
well, I highly recommend adding a catch for const kj::Exception& where you then print the message (use kj::str(exception).cStr() to get a string). Or you can catch std::exception and call its .what().
<pavar234>
yes, that would be a good idea
<kentonv>
(when we throw exceptions we make sure they also extend std::exception)
<pavar234>
I have some exceptions which don't inherit from that
<kentonv>
compiling in debug mode will also help a lot
<pavar234>
(not mine)
<pavar234>
so I have a catch(...)
<pavar234>
for the moment
<kentonv>
you can keep the catch-all as well
<kentonv>
but put the more-specific catches first
<pavar234>
anyway, I will check tomorrow
<pavar234>
yes I know
<pavar234>
thanks a lot for the hep
<pavar234>
help
<kentonv>
ok, let us know if you have more trouble
<pavar234>
it is always a pleasure with this community :)
<kentonv>
maurer: as for capabilities, yeah, comparing capabilities for equality is a complicated subject. I suspect that use cases where canonicalization makes sense generally will not overlap with use cases where capabilities may be present. It would probably even make sense to error out of canonicalization if a capability is seen, as this will almost certainly break whatever the caller was trying to do.
<warren>
Apache licensed web app, iOS, Android and Desktop apps
<warren>
I heard this was previously closed, then Dropbox bought it and open sourced it.
<zarvox>
They did!
<mnutt>
I’m trying to pack with vagrant-spk and when I upload it sandstorm.log reports `Archive contained invalid file name.; name = .` …is this something I’ve misconfigured in my pkgdef? I don’t see `.` in sandstorm-files.list anywhere.
simonv3 has quit [Quit: Connection closed for inactivity]
<zarvox>
mnutt: hmm, what are your searchPaths? can you pastebin the sandstorm-files.list somewhere?
<mnutt>
sure
<mnutt>
. is in the searchPath
<zarvox>
is emptystring in the sandstorm-files.list?