Having a problem downloading packages

15 views
Skip to first unread message

Jay Gischer

unread,
Jul 27, 2021, 6:13:09 PM7/27/21
to Sandstorm Development
I have been working on an app that will merge the output of more than one sandstorm index.  It's called sandstorm-index-merge and it is here on github.

I've run into a problem downloading packages.  Some packages download ok, but others fail with a 500 server error.

This does not appear to  be a timeout issue.  I get a diagnostic error message if a timeout occurs on the client side.

However, the notion that the actual server is failing on this is highly unlikely.  I can download the packages directly with my browser with no problem.

I'm kind of at a loss.  I am using the package Axios, I have collected all the diagnostic material it has to offer (Wow, it's a lot) and it is here 

This isn't a simple case of "you got the powerbox token dance wrong" because some packages do download, running through the same code.

My best, and admittedly wild-assed guess is that maybe there's a timeout in the proxy?  Or something like that?  I have no idea.  I'm not even sure this is something I should file as an issue for Sandstorm, tbh.

Thoughts?

Jacob Weisz

unread,
Jul 27, 2021, 6:42:07 PM7/27/21
to sandst...@googlegroups.com
I'd be really curious if Kenton could find a corresponding entry in the app index's grain log, if it's returning a 500 to you. Unfortunately that's one thing I can't see in the app index.

--
  Jacob Weisz

--
You received this message because you are subscribed to the Google Groups "Sandstorm Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sandstorm-de...@googlegroups.com.

Jay Gischer

unread,
Jul 28, 2021, 1:58:45 PM7/28/21
to Sandstorm Development
Yeah, that seems interesting.  For some reason I'm not getting these messages in Gmail, which is odd.

Jay Gischer

unread,
Jul 28, 2021, 2:26:54 PM7/28/21
to Sandstorm Development
I just realized that, since I have a grain running Sandstorm App Index on Mansia.net, I can run this experiment myself.  I think.  I downloaded a package from there, or attempted.  Got a similar error.  Looking at the "console" (Sandstorm's UI tooltip says "Show Debug Log"), I see nothing at all.  No error message, etc.  Again, the package exists and can be downloaded via the browser just fine.

Ian Denhardt

unread,
Jul 28, 2021, 3:08:47 PM7/28/21
to Jay Gischer, Sandstorm Development
Is there anything in the Sandstorm system log? If the grain is using
ApiSession for HTTP access, any errors in that code would be logged by
Sandstorm rather than the grains. Note that if the ApiSession
implementation throws an exception, sandstorm-http-bridge's adapter
will translate that as a 500 error, so that error isn't necessarily
coming from the app index itself.

Quoting Jay Gischer (2021-07-28 14:26:54)
> I just realized that, since I have a grain running Sandstorm App Index
> on Mansia.net, I can run this experiment myself. I think. I
> downloaded a package from there, or attempted. Got a similar error.
> Looking at the "console" (Sandstorm's UI tooltip says "Show Debug
> Log"), I see nothing at all. No error message, etc. Again, the
> package exists and can be downloaded via the browser just fine.
>
> On Wednesday, July 28, 2021 at 10:58:45 AM UTC-7 Jay Gischer wrote:
>
> Yeah, that seems interesting.� For some reason I'm not getting
> these messages in Gmail, which is odd.
>
> On Tuesday, July 27, 2021 at 3:42:07 PM UTC-7 Jacob Weisz wrote:
>
> I'd be really curious if Kenton could find a corresponding entry in the
> app index's grain log, if it's returning a 500 to you. Unfortunately
> that's one thing I can't see in the app index.
> --
> � Jacob Weisz
> � goo...@jacobweisz.com
>
> On Tue, Jul 27, 2021, at 5:12 PM, Jay Gischer wrote:
>
> I have been working on an app that will merge the output of more than
> one sandstorm index.� It's called sandstorm-index-merge and it is
> [1]here on github.
> I've run into a problem downloading packages.� Some packages download
> ok, but others fail with a 500 server error.
> This does not appear to� be a timeout issue.� I get a diagnostic
> error message if a timeout occurs on the client side.
> However, the notion that the actual server is failing on this is highly
> unlikely.� I can download the packages directly with my browser with
> no problem.
> I'm kind of at a loss.� I am using the package Axios, I have collected
> all the diagnostic material it has to offer (Wow, it's a lot) and it is
> [2]here�
> This isn't a simple case of "you got the powerbox token dance wrong"
> because some packages do download, running through the same code.
> My best, and admittedly wild-assed guess is that maybe there's a
> timeout in the proxy?� Or something like that?� I have no idea.� I'm
> not even sure this is something I should file as an issue for
> Sandstorm, tbh.
> Thoughts?
>
> --
>
> You received this message because you are subscribed to the Google
> Groups "Sandstorm Development" group.
>
> To unsubscribe from this group and stop receiving emails from it, send
> an email to sandstorm-de...@googlegroups.com.
>
> To view this discussion on the web visit
> [3]https://groups.google.com/d/msgid/sandstorm-dev/CAHCFCnPjebfkS%2BGcF
> 840wPZWArRfq%2B6r3%2Bt9sMcOoBT_05bdag%40mail.gmail.com.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Sandstorm Development" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to [4]sandstorm-de...@googlegroups.com.
> To view this discussion on the web visit
> [5]https://groups.google.com/d/msgid/sandstorm-dev/f187220f-8b01-4d25-a
> 646-145d71c9756cn%40googlegroups.com.
>
> Verweise
>
> 1. https://github.com/gischer/sandstorm-index-merge
> 2. https://mansia.net/shared/gTFDZFo1_ccu9VHUBjQTsVcddW6jfc4B4QgNDBDxaX7
> 3. https://groups.google.com/d/msgid/sandstorm-dev/CAHCFCnPjebfkS%2BGcF840wPZWArRfq%2B6r3%2Bt9sMcOoBT_05bdag%40mail.gmail.com?utm_medium=email&utm_source=footer
> 4. mailto:sandstorm-de...@googlegroups.com
> 5. https://groups.google.com/d/msgid/sandstorm-dev/f187220f-8b01-4d25-a646-145d71c9756cn%40googlegroups.com?utm_medium=email&utm_source=footer

Jay Gischer

unread,
Jul 28, 2021, 5:46:39 PM7/28/21
to Ian Denhardt, Sandstorm Development
I looked at /opt/sandstorm/var/log/sandstorm.log  on the system where my Index Merge is running and trying to download things.  I saw nothing that seemed to match what you are describing.  Furthermore, that file hasn't been touched today at all.  (It was touched yesterday.)

I did suspect the proxy, but if it would put something in this log file, then that's ruled out.

Jay Gischer

unread,
Jul 29, 2021, 6:15:31 PM7/29/21
to Sandstorm Development
Here's a strange fact.  I don't know what it means, or if its related.  I have sandstorm running on my dev machine.  Not in a Vagrant box,  just on the machine.  If I create an spk with vagrant-spk pack, and upload it, it goes through all the motions of updating, but does not have the changes or new behavior.  Even more strange, I can delete (on Sandstorm) the app, and then upload it, and Sandstorm will tell me that an instance of it already exists, and do I want to update it?  I don't know if this is expected behavior, but it sure surprises me.

On Wed, Jul 28, 2021 at 12:08 PM Ian Denhardt <i...@zenhack.net> wrote:

Jay Gischer

unread,
Jul 29, 2021, 7:14:57 PM7/29/21
to Sandstorm Development
One more observation.  Now in my Sandstorm log, I can see a bunch of entries that look like this:
Unhandled exception in Promise:  [Error: remote exception: grain is not running] {
  cppFile: '(remote)',
  line: 0,
  kjType: 'disconnected'
}

They come after a line that says

**Accepted new dev session connection...

I'm not sure which grain isn't running, it doesn't make much sense.  The remote grain is running, since I can download other files from it. The local grain is running of course.  What's going on here?
Reply all
Reply to author
Forward
0 new messages