These are chat archives for reactioncommerce/reaction

15th
Jul 2018
Ousmane Seidy Diallo
@TheBlackDude
Jul 15 2018 04:02
@loanlaux thanks, is the Shopify connector on the base repo or on a different repo?
Alghisi Alessandro
@alexalghisi
Jul 15 2018 05:41
@loanlaux I did set up now prerender.io and pre-render all pages but something fishy happens. When I try to open my website with a google bot User Agent the websocket connection fails and ends up in an infinite loop of retrying.
Alghisi Alessandro
@alexalghisi
Jul 15 2018 05:47
My setup is also CloudFlare unfortunately and the host is Heroku.
Screen Shot 2018-07-15 at 08.46.18.png
Now this happens ONLY when I set the google bot user agent :).
Patrick Newell
@pnewell4_twitter
Jul 15 2018 10:35
I may have asked this before, but has anyone experienced the admin panel opening, then immediately closing?
reaction-admin-panel.gif
Loan Laux
@loanlaux
Jul 15 2018 11:14
Never seen this one before @pnewell4_twitter
@alexalghisi What about simply opening Prerender's last-known version from your Prerender.io dashboard? There's a link to open every page and see them the way Prerender does. It's worked well for me on all the sites I've shipped with Reaction.
@TheBlackDude The Shopify connector has recently been switched to reaction-contrib: https://github.com/reaction-contrib/meteor-connector-shopify
Patrick Newell
@pnewell4_twitter
Jul 15 2018 11:17
thanks Loan.
just about everything on the page is re-rendering, which I'm sure is the reason, but having a difficult time tracking down the issue
Loan Laux
@loanlaux
Jul 15 2018 11:20
I would definitely look into one of your trackers, Pat. If it's rerendering the whole page continuously—it's probably because you're either constantly resubscribing to one or multiple publications, or DDP keeps sending you data continuously for a reason that I ignore
Do you see anything strange in the Meteor devtools?
Patrick Newell
@pnewell4_twitter
Jul 15 2018 11:24
thanks Loan! is this what you mean?
image.png
Loan Laux
@loanlaux
Jul 15 2018 11:26
Afaik, Meteor automatically unsubscribing from a publication once it's done with it is the normal behavior
I'd look for anything suspicious that happens at the exact moment when the rerender is triggered
Patrick Newell
@pnewell4_twitter
Jul 15 2018 11:27
hmm, ok. not seeing anything in the Meteor tab for that.
Loan Laux
@loanlaux
Jul 15 2018 11:29
Okay, not cool then... I'm out of ideas now, but what I'd do would be identifying what component is being re-rendered (using the React devtools) and putting breakpoints on pretty much anything that would cause it to re-render so I can understand what's happening
A bit of a dumb approach but sometimes it's all that's left
Patrick Newell
@pnewell4_twitter
Jul 15 2018 11:58
(just rubber ducking here 🦆...)
I see that in ProductGridContainer#componentWillMount there is a call to hide the action panel... now I've got to figure out why my grid is re-rendering!
Loan Laux
@loanlaux
Jul 15 2018 11:58
good catch :+1:
Loan Laux
@loanlaux
Jul 15 2018 14:45
Has anyone ever seen this error at startup after updating to 1.13.1?
TypeError: Cannot read property 'clean' of null
     at Object.Importer.object (server/api/core/importer.js:450:27)
     at Object.Importer.template (server/api/core/importer.js:318:15)
     at Assets.find.forEach.t (server/api/core/templates.js:278:27)
     at SynchronousCursor.forEach (packages/mongo/mongo_driver.js:1099:16)
     at Cursor.(anonymous function) [as forEach] (packages/mongo/mongo_driver.js:879:44)
     at Hooks.Events.add (server/api/core/templates.js:274:8)
     at /home/contact/bundle/programs/server/npm/node_modules/@reactioncommerce/hooks/dist/main.js:71:14
     at Array.reduce (<anonymous>)
     at Object.Hooks.Events.run (/home/contact/bundle/programs/server/npm/node_modules/@reactioncommerce/hooks/dist/main.js:70:22)
    at Object.init (server/api/core/core.js:72:18)
     at startup (server/startup/index.js:42:12)
     at Function.time (/home/contact/bundle/programs/server/profile.js:309:28)
     at /home/contact/bundle/programs/server/boot.js:427:13
     at /home/contact/bundle/programs/server/boot.js:472:5
     at Function.run (/home/contact/bundle/programs/server/profile.js:510:12)
     at /home/contact/bundle/programs/server/boot.js:470:11
From my research, this happens when importing the coreDefault email template (which is the first email template to be imported on startup, so I assume it would happen on just about any email template)
William Moss
@willmoss1000
Jul 15 2018 15:03
Hey @loan - no luck with the staging. Still getting Cross-Origin Read Blocking (CORB)
Loan Laux
@loanlaux
Jul 15 2018 15:03
@willmoss1000 Are you 100% sure that you have added a BrowserPolicy.content.allowOriginForAll rule for your CloudFront domain?
Dumb question but I have to check
William Moss
@willmoss1000
Jul 15 2018 15:06
Yep, 100%
Loan Laux
@loanlaux
Jul 15 2018 15:21
And what did using Meteor.isProduction lead to?
William Moss
@willmoss1000
Jul 15 2018 15:37
@loanlaux I had to whitelist some headers!
Loan Laux
@loanlaux
Jul 15 2018 15:37
Did that solve the issue?
William Moss
@willmoss1000
Jul 15 2018 15:43
Yep, all good
Not 100% sure exactly what the issue was
But one of the headers whitelisted fixed the issue
Thanks for your help, it was very much appreciated!
Loan Laux
@loanlaux
Jul 15 2018 15:50
I'm glad you sorted it out. That was a weird one for sure!
William Moss
@willmoss1000
Jul 15 2018 15:51
Yes, it's very unfamiliar territory for me - so it's always great to know there's not a simple fix
But yes, I am using your Meteor.isProduction to make sure it doesn't call it in local