Embedding parts of a Meteor app elsewhere

Trying to embed parts of my Meteor app in a static website. I’d like to reuse my top navigation, so if visitors to the static blog/landing pages of my site are logged into my Meteor app, then they’ll see nav links corresponding to their state. I also have a MailChimp list subscription form that I’d like to embed in blog posts to make things look relatively uniform.

Unfortunately I’m running into some issues, and unfortunately they only seem to happen in production, so I don’t get convenient error messages and unminifed code. In particular, I’m getting:

detailed error: NS_ERROR_FAILURE:
error source line:

…o)?!1:(o=t,f.changed(),!0)},m=function(){var t=location.href,e;e=k()?new u(s(t))…

f9c7622…96ce.js (line 94)
log:
This appears to be Firefox
f9c7622…96ce.js (line 248)
GET https://www.perceptronapp.com/sockjs/info?cb=93jif4595o

Aborted

f9c7622…96ce.js (line 32)
detailed error: TypeError: Package[‘service-configuration’] is undefined
error source line:

I think the NS_ERROR_FAILURE might be a Firebug artifact, so I’m not as worried about it. I am, however, worried about this missing definition.

A few questions:

  1. Is there any reason this shouldn’t work? I have a /nav template that only embeds my navbar component and a /subscribe templayte for just my subscription form.

  2. I’ve temporarily set a completely permissive browser-policy, and will lock things down once I’ve gotten things working. What more should I do? At the moment my code looks like:

<iframe src="/nav"></iframe>

I’ve even subbed in my full domain name to eliminate possible errors.

  1. Interestingly enough, I have 2 embeds of this type. The second, the list subscribe form, always seems to work. The first, the navbar at /nav, fails the first time with this error. If I reload the page with ctrl-r, it works. If I load the page at a later time, it works. If I reload with ctrl-shift-r, invalidating the browser cache, it fails with the above message and the page loaded in from /nav is blank. This makes me wonder about race conditions or some other factor. I think I recall that browser connections to a single host are limited to some insanely low number. Maybe both these iframes are hitting at the same time, plus the normal asset-loading for the embedding page, and the Meteor page isn’t loading whichever asset defines packages or packages['service-configurations']? The app works fine viewed normally, it’s just this first load and this first iframe whose embed fails.

  2. Is there a better way to do this? I’d rather not manage static content in Meteor for a bunch of reasons, but I’d like for my blog to look a bit like the rest of my app. So I’d like to embed reactive components like the navigation bar, maybe notifications, etc.

Thanks.

Hello from the future,

did you ever figure this one out? I’m also seeing it in (maybe) an iframe in firefox