[SOLVED] Debugging an issue with prerender


#1

Ok, so my prerendering broke (mdg:seo / prerender.io) and I have no idea how to decypher the error it’s throwing. I’m testing my site locally through prerenders middleware (info at their website). This is going to be impossible to debug…

TypeError: Attempting to configurable attribute of unconfigurable property.

  http://localhost:3000/packages/modules.js?hash=1eb46fa2643f185cb4b43e95b0f981cc3cf195b2:167151 in defineProperty
  http://localhost:3000/packages/modules.js?hash=1eb46fa2643f185cb4b43e95b0f981cc3cf195b2:167151 in defineProperty
  http://localhost:3000/packages/modules.js?hash=1eb46fa2643f185cb4b43e95b0f981cc3cf195b2:505 in setESModule
  http://localhost:3000/packages/modules.js?hash=1eb46fa2643f185cb4b43e95b0f981cc3cf195b2:359 in moduleExport
  http://localhost:3000/app/app.js?hash=699c745e1d3b0bfe13c47a299d4297d8dda47621:63903 in collections.js
  http://localhost:3000/packages/modules-runtime.js?hash=8587d188e038b75ecd27ed2469a52b269e38fb62:343 in fileEvaluate
  http://localhost:3000/packages/modules-runtime.js?hash=8587d188e038b75ecd27ed2469a52b269e38fb62:238 in require
  http://localhost:3000/app/app.js?hash=699c745e1d3b0bfe13c47a299d4297d8dda47621:61567 in challenges.js
  http://localhost:3000/packages/modules-runtime.js?hash=8587d188e038b75ecd27ed2469a52b269e38fb62:343 in fileEvaluate
  http://localhost:3000/packages/modules-runtime.js?hash=8587d188e038b75ecd27ed2469a52b269e38fb62:238 in require
  http://localhost:3000/app/app.js?hash=699c745e1d3b0bfe13c47a299d4297d8dda47621:64371 in index.js
  http://localhost:3000/packages/modules-runtime.js?hash=8587d188e038b75ecd27ed2469a52b269e38fb62:343 in fileEvaluate
  http://localhost:3000/packages/modules-runtime.js?hash=8587d188e038b75ecd27ed2469a52b269e38fb62:238 in require
  http://localhost:3000/app/app.js?hash=699c745e1d3b0bfe13c47a299d4297d8dda47621:25790 in main.js
  http://localhost:3000/packages/modules-runtime.js?hash=8587d188e038b75ecd27ed2469a52b269e38fb62:343 in fileEvaluate
  http://localhost:3000/packages/modules-runtime.js?hash=8587d188e038b75ecd27ed2469a52b269e38fb62:238 in require
There is no route for the path: /

#2

The prerender guys have been pretty good at getting involved here … pinging @prerender


#3

Yeah the guys who make prerender are definitely awesome. Very responsive. I did send an email and they managed to get the line numbers. Still not making a whole lot of sense to me though, and I don’t want to keep bugging them with issues.

// Here's the error I'm seeing with the line numbers. Let me know if you have any questions about this:

[Error] TypeError: Attempting to configurable attribute of unconfigurable property.
defineProperty (148ab9d54c6832d04aa609db0b370780c224e445.js, line 13)
e (148ab9d54c6832d04aa609db0b370780c224e445.js, line 13)
i (148ab9d54c6832d04aa609db0b370780c224e445.js, line 13)
i (148ab9d54c6832d04aa609db0b370780c224e445.js, line 13)
common.js (148ab9d54c6832d04aa609db0b370780c224e445.js, line 175)
l (148ab9d54c6832d04aa609db0b370780c224e445.js, line 11)
e (148ab9d54c6832d04aa609db0b370780c224e445.js, line 11)
index.js (148ab9d54c6832d04aa609db0b370780c224e445.js, line 175)
l (148ab9d54c6832d04aa609db0b370780c224e445.js, line 11)
e (148ab9d54c6832d04aa609db0b370780c224e445.js, line 11)
main.js (148ab9d54c6832d04aa609db0b370780c224e445.js, line 175)
l (148ab9d54c6832d04aa609db0b370780c224e445.js, line 11)
e (148ab9d54c6832d04aa609db0b370780c224e445.js, line 11)
global code (148ab9d54c6832d04aa609db0b370780c224e445.js, line 175)

#4

Thanks for the ping @robfallows!

@methodx Don’t ever feel like you are bugging us! We’re happy to help!

Since we currently use PhantomJS as our rendering engine, it looks like this issue relates to this github issue: https://github.com/ariya/phantomjs/issues/13895

It looks like you might be trying to set the property “name” on some object through Object.defineProperty and for some reason it’s not working correctly in PhantomJS. Any idea if you’re doing that anywhere in your code? I haven’t seen this issue anywhere else so I don’t think it’s in the Meteor code.


#5

Hey Todd, I figured out what the issue is… it’s Meteor 1.5. I rolled back to 1.4 and all is well again (no other variables changed). If you’d like, I can send you copies of my source code at 1.4 and 1.5 so you can figure out what’s up with Meteor. I’d also be interested in hearing from anyone successfully using prerender (on Galaxy) with 1.5.


#6

Interesting! That’s unfortunate :frowning: We definitely have lots of people using Prerender on Galaxy. Not sure which versions they are using.

We are planning on switching from PhantomJS to Headless Chrome in the next few months so this problem shouldn’t be around much longer if it’s anything due to Meteor 1.5!


#7

Hi @prerender, @methodx
I’m also having troubles with my app hosted on Galaxy, It was working well some months ago (last time I checked was probably in May) and I don’t exactly know since when it’s bugging. escape fragment used to return the cached content of my app but not anymore.
I’m on meteor 1.5 and tried to downgrade to 1.4.4.3 but it didn’t change anything so I assume it might be a bug in my config.

When I test it locally with prerender, it returns

There is no route for the path: /

  http://localhost:3020/packages/kadira_flow-router.js?hash=aa2065828a8c366f5fdf253f0d738098c24cc589:517 in _notfoundRoute
2017-08-26T11:37:48.340Z got 200 in 5500ms for http://localhost:3020/
2017-08-26T11:37:48.371Z getting merged-stylesheets.css?hash=3ef602c65229ca0ce5dd9a3d907faa382d9bbd1e
2017-08-26T11:37:48.713Z got 504 in 342ms for merged-stylesheets.css?hash=3ef602c65229ca0ce5dd9a3d907faa382d9bbd1e
2017-08-26T11:37:49.265Z getting favicon.ico
2017-08-26T11:37:49.677Z got 504 in 412ms for favicon.ico

It’s likely an issue with routing but cannot figure out what to change, my routing file is in lib/routes.js and is called from client and server.

I’m using flowrouter and blaze. I have the meteorhacks:ssr package installed to generate email templates server-side but disabling it has apparently no impact on this issue.

Any clue on what to do to make prerender work again?
Thanks for your help


#8

When I updated to Meteor 1.5.1 the issue resolved itself. Hopefully the same applies to you!


#9

Thanks for your quick reply.
Unfortunately not, I’ve updated back to 1.5 after trying 1.4 but it’s still the same.
Are you also using flowrouter and blaze or are you using react and react router?


#10

I’m using React and FlowRouter. Also, just to clarify, I updated to 1.5.1, not 1.5