These are chat archives for reactioncommerce/reaction

26th
Apr 2016
xiaoc li
@brianxcli
Apr 26 2016 10:51
blob
Using IE11 and Edge, I get the error all the time,
Does it mean that they don't support Reaction at the moment?
Brent Hoover
@zenweasel
Apr 26 2016 10:54
it’s probably calling stop on a subscription, but that’s a new one to me
xiaoc li
@brianxcli
Apr 26 2016 11:00
things become strange when changing to IE
Brent Hoover
@zenweasel
Apr 26 2016 11:01
Hmmmm
I will have to drag out the VM’s and try it out
Lukas Sägesser
@ScyDev
Apr 26 2016 13:26

I noticed that image upload always rotates portrait images by 90°. But landscape image are displayed with their original rotation.

Where can this behaviour be disabled?

Lukas Sägesser
@ScyDev
Apr 26 2016 13:37
solved by adding autoOrient()
      transformWrite: function (fileObj, readStream, writeStream) {
        if (gm.isAvailable) {
          gm(readStream, fileObj.name).autoOrient().resize("1000", "1000").stream()
            .pipe(writeStream);
        } else {
          readStream.pipe(writeStream);
        }
      }
Aaron Judd
@aaronjudd
Apr 26 2016 17:16
interesting, should that be a default? (never noticed this as an issue)
Lukas Sägesser
@ScyDev
Apr 26 2016 17:25
I think yes, this should be active by default.
Anthony Young
@ayoungh
Apr 26 2016 21:04
Would you say this is ok to be used in production for a small site yet?
Aaron Judd
@aaronjudd
Apr 26 2016 21:06
@ayoungh yes, but depends on your requirements, and skills. still needs a little love and configuration for most shops.
Anthony Young
@ayoungh
Apr 26 2016 21:06
:) sweet
I am a javascript dev
got some nodejs experience, expressjs, mongodb etc
:)
hopefully that is enough to get me through and give a hand
Mike Murray
@mikemurray
Apr 26 2016 21:07
:thumbsup:
Anthony Young
@ayoungh
Apr 26 2016 21:07
when is the next release
Aaron Judd
@aaronjudd
Apr 26 2016 21:07
v0.12 is pretty stable (master branch) but 0.13 (development branch) will be another big change, as it represents a migration to more “node like” environment and less Meteor -ish..
we’re shooting to get this out within the next 2 weeks, but it’s going to be a rough transition, at least from the way things work now.. to the way the will work.. if you have made customizations
(moving away from Atmosphere / Meteor packages to modules and NPM )
Anthony Young
@ayoungh
Apr 26 2016 21:09
sweet that sounds great
is the goal to be fully away from meteor?
Aaron Judd
@aaronjudd
Apr 26 2016 21:11
not entirely - we’ll still use Meteor components (DDP/Blaze/LiveQuery). They’re joining the “node world” as well, so it’s a big change for everyone, but the end effect is yes.. that Meteor will be less relevant as the key / core component of what we’re doing..
we are working on making sure existing 0.12 projects / packages will upgrade smoothly-ish, but I’m not yet sure what that will look like right now.. probably a better idea end of week. I’d say that right now, today, though - it’s safe to use either branch.
Anthony Young
@ayoungh
Apr 26 2016 21:23
:)
That sounds good, I haven't used Meteor much
Spencer Norman
@spencern
Apr 26 2016 21:34
Getting this error when trying to run my bundle on digital ocean:
WARNING: npm peer requirements (for reactioncommerce:reaction-ui) not installed:
 - react@15.0.x not installed.
 - react-dom@15.0.x not installed.
 - meteor-node-stubs@0.2.x not installed.

Read more about installing npm peer dependencies:
  http://guide.meteor.com/using-packages.html#peer-npm-dependencies
Aaron Judd
@aaronjudd
Apr 26 2016 21:38
@spencern did you do npm install first? that looks like the package.json packages
Spencer Norman
@spencern
Apr 26 2016 21:39
in the bundle/programs/server directory I did
trying to install those using meteor npm install —save react react-dom meteor-nod-stubs prior to bundling now
and see if that does it
Aaron Judd
@aaronjudd
Apr 26 2016 21:39
this is the app level dependencies, not the packages (even though the warning is from the packages / check-nom-versions)
Spencer Norman
@spencern
Apr 26 2016 21:40
oh, interesting
Aaron Judd
@aaronjudd
Apr 26 2016 21:41
part of the bogus npm implementation of 1.3 is that if you have peer dependencies, you need to manually install them at the app level… (even if they are in the Npm.depends of the package)
Spencer Norman
@spencern
Apr 26 2016 21:41
ok
so when I ran meteor npm install initially that didn’t install them, but that’s expected?
Aaron Judd
@aaronjudd
Apr 26 2016 21:41
it should have, that’s the weird thing..
Spencer Norman
@spencern
Apr 26 2016 21:41
hmm
well, my tarball is building now, I’ll let you know if thats working
Aaron Judd
@aaronjudd
Apr 26 2016 21:42
k
Spencer Norman
@spencern
Apr 26 2016 21:55
same issue when building after installing
Aaron Judd
@aaronjudd
Apr 26 2016 22:01
@spencern not sure why. I’m sure you’ve seen this: http://guide.meteor.com/using-packages.html#peer-npm-dependencies and they are specifically showing ‘react’ as in the example...
Spencer Norman
@spencern
Apr 26 2016 22:02
yeah I saw that, tried installing react like that, but they don’t have any examples of what to do when deploying
it’s working great on my local
possible that this is the culprit also?
root@dev:/home/gtfttd# tail gtfttd.log
22:04:27.137Z  INFO Reaction: No shopId, waiting one second...
22:04:28.142Z  INFO Reaction: No shopId, waiting one second...
22:04:29.149Z  INFO Reaction: No shopId, waiting one second...
22:04:30.158Z  INFO Reaction: No shopId, waiting one second...
22:04:31.165Z  INFO Reaction: No shopId, waiting one second...
22:04:32.172Z  INFO Reaction: No shopId, waiting one second...
22:04:33.177Z  INFO Reaction: No shopId, waiting one second...
22:04:34.185Z  INFO Reaction: No shopId, waiting one second...
22:04:35.188Z  INFO Reaction: No shopId, waiting one second...
22:04:36.194Z  INFO Reaction: No shopId, waiting one second…
Spencer Norman
@spencern
Apr 26 2016 22:15
ok, turns out it may have been my mongo db connection
so completely unrelated
or maybe not
Aaron Judd
@aaronjudd
Apr 26 2016 22:33
@spencern you see this: http://guide.meteor.com/deployment.html#custom-deployment (npm install production)
Spencer Norman
@spencern
Apr 26 2016 22:34
I saw that, not really sure what to do with it
is that in place of meteor npm install ?
Aaron Judd
@aaronjudd
Apr 26 2016 22:34
the noShopId is an intentional wait, and is a resolution for these custom deployment / docker images where the db is not local.. it’s waiting for the Shop data to be populated (used to be it would just die because it tried to create admin user before the shop exists)
yeah, I suggest from a clean build, then do the install production, then the build… (just like the example) see how that works out
Spencer Norman
@spencern
Apr 26 2016 22:36
so clean pull into new directory, npm install —production, then meteor build —arch
Aaron Judd
@aaronjudd
Apr 26 2016 22:37
I think that should work.
Spencer Norman
@spencern
Apr 26 2016 22:40
So, before I did that, I nuked my mongo db and started over w/ clean mongo
and it’s loading now
still got the warning about the npm peer requirements
but things seem to be working for now
Aaron Judd
@aaronjudd
Apr 26 2016 22:42
interesting…. but ok
Spencer Norman
@spencern
Apr 26 2016 22:42
also, firefox seems to take forever to load the site
but chrome is fine
Aaron Judd
@aaronjudd
Apr 26 2016 22:43
see #979
Spencer Norman
@spencern
Apr 26 2016 22:43
25s load time vs ~4s on chrome
k
Aaron Judd
@aaronjudd
Apr 26 2016 22:43
looking into it...
Spencer Norman
@spencern
Apr 26 2016 22:44
I’ll see if I can reproduce this issue with the db
Ok, I can reproduce the issue with the db by just restarting my server
restarting a server that is connected to a remote db, causes and endless loop of No shopId, waiting one second…
Aaron Judd
@aaronjudd
Apr 26 2016 22:51
that’s also a sign that the connection to the db might not be happening..
Spencer Norman
@spencern
Apr 26 2016 22:51
it’s definitely connected
I removed one shop from the db manually
and when the server restarted, it added it back
(the <blank site> shop)
and then continued after checking all packages to the No shopId issue
Aaron Judd
@aaronjudd
Apr 26 2016 22:54
you don’t need to include reaction-sample-data if your DB already has data, alternately you can customize that package to only include a single shop. but that’s clearly not right, because if there is a shop Id and a default user
ReactionRegistry.createDefaultAdminUser = function () {
  Logger.info("Starting createDefaultAdminUser");
  let options = {};
  const domain = ReactionRegistry.getRegistryDomain();
  const defaultAdminRoles = ["owner", "admin", "guest", "account/profile"];
  let accountId;

  while (!ReactionCore.getShopId()) {
    Logger.info("No shopId, waiting one second...");
    Meteor._sleepForMs(1000);
  }
Spencer Norman
@spencern
Apr 26 2016 22:55
yeah, I could remove the sample data package
will reaction provision a default shop without that package?
Aaron Judd
@aaronjudd
Apr 26 2016 22:55
nope
Spencer Norman
@spencern
Apr 26 2016 22:55
k, that’s what I thought
It seems like ReactionCore.getShopId() is coming back blank for some reason
(obviously I guess)
I’m on a super slow hotel wifi connection, but trying to add some debug info and re bundle right now
Aaron Judd
@aaronjudd
Apr 26 2016 22:57
and that’s dependent on a Tracker.autorun that checks ReactionCore.Subscriptions.Shops.ready()
as soon as the sub is ready, getShopId() should return as well
Spencer Norman
@spencern
Apr 26 2016 22:58
ok
Aaron Judd
@aaronjudd
Apr 26 2016 23:00
@zenweasel was experiencing this a lot from his connection (in Philippines) where the connection speeds are slower/latency higher.. he might have some insights here
Spencer Norman
@spencern
Apr 26 2016 23:00
is there anything in your mind that would cause this to happen the second+ times
because if I nuke the db server
it works great the first load
Aaron Judd
@aaronjudd
Apr 26 2016 23:00
to me, that makes no sense
Spencer Norman
@spencern
Apr 26 2016 23:00
but then after restarting the app server it struggles again
Aaron Judd
@aaronjudd
Apr 26 2016 23:01
anything custom about the sample-data ?
Brent Hoover
@zenweasel
Apr 26 2016 23:01
When running docker containers locally I was seeing it take 7-8 seconds to load the shopId
Spencer Norman
@spencern
Apr 26 2016 23:02
hmm
Brent Hoover
@zenweasel
Apr 26 2016 23:02
but it did find it and then continue
Spencer Norman
@spencern
Apr 26 2016 23:02
I’m seeing it run for 60+ seconds
Brent Hoover
@zenweasel
Apr 26 2016 23:02
my preliminary guess was that it had to do with inserted data being indexed
Spencer Norman
@spencern
Apr 26 2016 23:02
or more
and running on compose/digital ocean
where compose is in the same datacenter as my DO droplet
and it’s finding the server and updating all of the package and shop info
and then on the strugglebus for finding the shopId
Aaron Judd
@aaronjudd
Apr 26 2016 23:03
I don’t see anything obvious here.. particular if Shops is populated.
Brent Hoover
@zenweasel
Apr 26 2016 23:04
yeah, that’s why I think it’s indexing data, it’s not that it can’t find the server, just that the record is blocked by the db while it’s being indexed. Again, just a guess
something that’s super common with YesSQL databases, lock the table while the index is being built
Aaron Judd
@aaronjudd
Apr 26 2016 23:05
what about the compose db version?
:bike: home now, I’ll catch up later on this
Spencer Norman
@spencern
Apr 26 2016 23:05
cool
3.0.6
Aaron Judd
@aaronjudd
Apr 26 2016 23:06
should work, but if it’s an easy test you could try a 2.6 db.. that’s one thing that comes to mind.
Spencer Norman
@spencern
Apr 26 2016 23:49
A little deeper dive and the problem is that my domain dev.gtfttd.com in this case, is never getting added to the Shops domains array
Aaron Judd
@aaronjudd
Apr 26 2016 23:58
are you setting ROOT_URL in your environment variables?
Spencer Norman
@spencern
Apr 26 2016 23:58
let me check
yes
should I not be?