Open BradRyan opened 9 years ago
FYI, the errors when using the packages dfischer:phantomjs and spiderable I don't get any errors locally, but when running on the server I am seeing the following error when including the escaped fragment.
spiderable: phantomjs failed: { [Error: Command failed: Can't open '/dev/stdin'
] killed: false, code: 255, signal: null }
stderr: Can't open '/dev/stdin'
Error: Meteor code must always run within a Fiber. Try wrapping callbacks that you pass to non-Meteor libraries with Meteor.bindEnvironment.
at Object.Meteor._nodeCodeMustBeInFiber (packages/meteor/dynamics_nodejs.js:9:1)
at [object Object]._.extend.get (packages/meteor/dynamics_nodejs.js:21:1)
at [object Object].RouteController.lookupOption (packages/iron:router/lib/route_controller.js:66:1)
at new Controller.extend.constructor (packages/iron:router/lib/route_controller.js:26:1)
at [object Object].ctor (packages/iron:core/lib/iron_core.js:88:1)
at Function.Router.createController (packages/iron:router/lib/router.js:201:1)
at Function.Router.dispatch (packages/iron:router/lib/router_server.js:39:1)
at Object.router (packages/iron:router/lib/router.js:15:1)
at next (/mnt/app/node_modules/connect/lib/proto.js:190:15)
at packages/spiderable/spiderable_server.js:123:1
at ChildProcess.exithandler (child_process.js:652:7)
at ChildProcess.emit (events.js:98:17)
at maybeClose (child_process.js:756:16)
at Process.ChildProcess._handle.onexit (child_process.js:823:5)
Found package.json: ./package.json
Start script specified in package.json: node main.js
Initializing Node.js 0.10.33
Now using node v0.10.33
Running command: npm start
How are you using the package?
On Tue, Jul 7, 2015 at 11:36 PM, BradRyan notifications@github.com wrote:
FYI, the errors when using the packages dfischer:phantomjs and spiderable I don't get any errors locally, but when running on the server I am seeing the following error when including the escaped fragment.
spiderable: phantomjs failed: { [Error: Command failed: Can't open '/dev/stdin' ] killed: false, code: 255, signal: null } stderr: Can't open '/dev/stdin'
Error: Meteor code must always run within a Fiber. Try wrapping callbacks that you pass to non-Meteor libraries with Meteor.bindEnvironment. at Object.Meteor._nodeCodeMustBeInFiber (packages/meteor/dynamicsnodejs.js:9:1) at [object Object]..extend.get (packages/meteor/dynamics_nodejs.js:21:1) at [object Object].RouteController.lookupOption (packages/iron:router/lib/route_controller.js:66:1) at new Controller.extend.constructor (packages/iron:router/lib/route_controller.js:26:1) at [object Object].ctor (packages/iron:core/lib/iron_core.js:88:1) at Function.Router.createController (packages/iron:router/lib/router.js:201:1) at Function.Router.dispatch (packages/iron:router/lib/router_server.js:39:1) at Object.router (packages/iron:router/lib/router.js:15:1) at next (/mnt/app/node_modules/connect/lib/proto.js:190:15) at packages/spiderable/spiderable_server.js:123:1 at ChildProcess.exithandler (child_process.js:652:7) at ChildProcess.emit (events.js:98:17) at maybeClose (child_process.js:756:16) at Process.ChildProcess._handle.onexit (child_process.js:823:5) Found package.json: ./package.json Start script specified in package.json: node main.js Initializing Node.js 0.10.33 Now using node v0.10.33 Running command: npm start
— Reply to this email directly or view it on GitHub https://github.com/benjick/stripe-meteor/issues/3#issuecomment-119349801 .
The stripe package? At the time the error is thrown I'm not using it at all. It's just being loaded with the recommended startup code. In my app, I'm using Stripe Connect, and other miscellaneous charge / refund features. Note that I don't normally get this error, but when I type in ''www.mywebsite.com?_escapedfragment='', the error appears.
This didn't occur with the regular spiderable package, but the server threw exceptions that would allow the web spiders to crawl my site.
So you're not using the package?
Could you do if(typeof(Stripe) !== 'undefined') { Stripe.set.... }
?
Thanks for the suggestion... Where would you recommend I place that code exactly?
nevermind... I get it!
I get the same error that I had previously on the local machine. I don't think the startup code is run when using ?escaped_fragment=. I put a log in front of the setPublishable key and I'm not seeing it. Perhaps because it's not initalized it throws the error becouse of stripe functions on the server?
This error is strange though:
Stripe.isDoubleLoaded.H.stack.PostMessageTransport.g.onDOMReady
Strange, are you doing setPublishableKey
on client only or both?
I've been setting it in the client only.
+1
@adamwong246 FYI, I ended up pulling this out of my client code and just establishing the key on my calls. Definitely messed up my SEO for a bit.
I've been having spiderable issues when testing the '?_escapedfragment=' (similar to those here: https://github.com/iron-meteor/iron-router/issues/1192) while hosting on Modulus. I was attempting to fix them by using ongoworks:spiderable package. The error I was getting on the server is resolved, but now I'm seeing some other strange issues.
Using the ongoworks:spiderable package on the server, the following shows up inside my browser window's
tags. I'm concerned this might actually show up in crawler results as I can see it on my browser window.Using the ongoworks:spiderable package on localhost (http://localhost:3000/?_escaped_fragment_=) I get the following errors in my browser console.
Any ideas?