Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Thomas
    @lacrx
    i was wondering if that might have something to do with an error i'm getting on the backend. i'm getting the warning on the backend telling me that my store url isn't set. i wonder if that's related to the cors issue on the frontend
    basically, would my backend reaction instance block requests from the frontend because the store url isn't set?
    Loan Laux
    @loan-laux
    Yep, that might be the case. Try and set it, see if it changes anything.
    Thomas
    @lacrx
    ah okay, it looks like my errors are originating from the issue i'm having with the backend service. i can authenticate, but the admin area is blank, except for a logout button and logo. i'm getting this error upon login:
    Exception while invoking method 'oauth/login' { Error: Match error: Expected string, got undefined
    at check (packages/check/match.js:36:17)
    at MethodInvocation.oauthLogin (imports/plugins/core/hydra-oauth/server/oauthMethods.js:18:3)
    at currentArgumentChecker.withValue (packages/check/match.js:118:15)
    at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1304:12)
    at Object._failIfArgumentsAreNotAllChecked (packages/check/match.js:116:43)
    at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1764:18)
    at DDP._CurrentMethodInvocation.withValue (packages/ddp-server/livedata_server.js:719:19)
    at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1304:12)
    at DDPServer._CurrentWriteFence.withValue (packages/ddp-server/livedata_server.js:717:46)
    at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1304:12)
    at Promise (packages/ddp-server/livedata_server.js:715:46)
    at new Promise (<anonymous>)
    at Session.method (packages/ddp-server/livedata_server.js:689:23)
    at packages/ddp-server/livedata_server.js:559:43
    message: 'Match error: Expected string, got undefined',
    path: '',
    sanitizedError: 
    { Error: Match failed [400]
    at errorClass.<anonymous> (packages/check/match.js:91:27)
    at new errorClass (packages/meteor.js:725:17)
    at check (packages/check/match.js:36:17)
    at MethodInvocation.oauthLogin (imports/plugins/core/hydra-oauth/server/oauthMethods.js:18:3)
    at currentArgumentChecker.withValue (packages/check/match.js:118:15)
    at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1304:12)
    at Object._failIfArgumentsAreNotAllChecked (packages/check/match.js:116:43)
    at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1764:18)
    at DDP._CurrentMethodInvocation.withValue (packages/ddp-server/livedata_server.js:719:19)
    at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1304:12)
    at DDPServer._CurrentWriteFence.withValue (packages/ddp-server/livedata_server.js:717:46)
    at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1304:12)
    at Promise (packages/ddp-server/livedata_server.js:715:46)
    at new Promise (<anonymous>)
    at Session.method (packages/ddp-server/livedata_server.js:689:23)
    at packages/ddp-server/livedata_server.js:559:43
    isClientSafe: true,
    error: 400,
    reason: 'Match failed',
    details: undefined,
    message: 'Match failed [400]',
    errorType: 'Meteor.Error' },
    so i'm not actually able to set my store url, because there's effectively no backend ui due to a meteor match error (i'm assuming it's trying to match my userid)
    Loan Laux
    @loan-laux
    Are you able to reach or Hydra public? What about the Hydra admin API from your private network? I’d test the connectivity to both as a first step.
    Juan Manuel Garcia
    @irpaglide1_gitlab

    Hello, first time using gitter, apologies for any noise that my unexperience might add to ongoing conversations.

    I'm deploying reactioncommerce on digitalocean kubernetes, using terraform.

    So far, I've been able to:

    1. Deploy mongodb
    2. Deploy postgres
    3. Deploy reactioncommerce
    4. Deploy Hydra
      I see succesful logs for everything I listed above, and all those pods are running properly and receiving connections.

    However, I'm having issues deploying the storefront. I am probably not porting the docker-compose to the kubernetes deployment properly. The error i'm getting is as follows:

    Updating Hydra client...
    OK: Hydra client updated
    warn - You have enabled experimental feature(s).
    warn - Experimental features are not covered by semver, and may cause unexpected or broken application behavior. Use them at your own risk.

    Error: Could not find a valid build in the '/usr/local/src/app/.next' directory! Try building your app with 'next build' before starting the server.
    at Server.readBuildId (/usr/local/src/app/node_modules/next/dist/next-server/server/next-server.js:974:23)
    at new Server (/usr/local/src/app/node_modules/next/dist/next-server/server/next-server.js:64:29)
    at createServer (/usr/local/src/app/node_modules/next/dist/server/next.js:2:328)
    at start (/usr/local/src/app/node_modules/next/dist/server/lib/start-server.js:1:323)
    at nextStart (/usr/local/src/app/node_modules/next/dist/cli/next-start.js:20:125)
    at /usr/local/src/app/node_modules/next/dist/bin/next:28:339
    error Command failed with exit code 1.

    I've tried adding command: ["bin/start"] and adding, the "next build" inside, but it doesn't work either. I can provide those logs if someone is curious about it.

    Thank you and sorry for the long message.

    3 replies
    Thomas
    @lacrx
    @loan-laux that's a very good point. i'll take a look
    enzo - Eduardo Garcia
    @enzolutions
    Hello, folks, anyone has a guide to setup Reaction Commerce in Digital Ocean using Kubernetes ? or any other opcion in Digital Ocean? Thanks in advance.
    Loan Laux
    @loan-laux
    @enzolutions There’s a tutorial that covers deploying on DO with Traefik: https://github.com/reactioncommerce/proxy-traefik
    enzo - Eduardo Garcia
    @enzolutions
    Thank you @loan-laux
    kamaljaiswal
    @kamaljaiswal
    If I do any change in proxy-traefik/playbooks/reaction.yml get error {"before": "c2d8d21f20a0066e5c9c0fb7ed7273f0feadca8f", "changed": false, "msg": "Local modifications exist in repository (force=no)."}
    to retry, use: --limit @/root/workspace_reaction/proxy/playbooks/reaction.retry when I modify the same do_auth_token: "YOUR_DIGITALOCEAN_AUTH_TOKEN"
    domain: "YOUR_DOMAIN"
    email: "YOUR_EMAIL"
    kamaljaiswal
    @kamaljaiswal
    Any help how to set up hydra on digital ocean would be great .thanks
    kamaljaiswal
    @kamaljaiswal

    ASK [Create Docker network named web] *
    fatal: [reaction.server]: FAILED! => {"changed": true, "cmd": ["docker", "network", "create", "web"], "delta": "0:00:00.251724", "end": "2020-07-16 07:13:04.127788", "msg": "non-zero return code", "rc": 1, "start": "2020-07-16 07:13:03.876064", "stderr": "Error response from daemon: network with name web already exists", "stderr_lines": ["Error response from daemon: network with name web already exists"], "stdout": "", "stdout_lines": []}
    ...ignoring

    TASK [Create Docker network named internal] **
    fatal: [reaction.server]: FAILED! => {"changed": true, "cmd": ["docker", "network", "create", "internal"], "delta": "0:00:00.065765", "end": "2020-07-16 07:13:04.713790", "msg": "non-zero return code", "rc": 1, "start": "2020-07-16 07:13:04.648025", "stderr": "Error response from daemon: network with name internal already exists", "stderr_lines": ["Error response from daemon: network with name internal already exists"], "stdout": "", "stdout_lines": []}
    ...ignoring
    I added ignore_errors: yes to skip .

    not working
    Ankur Pata
    @ankurpata
    You need to delete networks web and internal.
    Remove all the code inside reaction/reaction-development-p
    And run ansible script again.
    Ansible throws error when it finds any modifications on deployed code. Although there is a python config setting you can google to disable this
    kamaljaiswal
    @kamaljaiswal
    thanks for response ..checking the same :)
    what is best way to deploy on Digital Ocean (Cloud) proxy-traefik or direct reaction-development-platform
    Any guidance how to configure home_url in reaction-development-platform as struggling same via make file
    Ankur Pata
    @ankurpata
    Its the best you have.
    you can customize it as per your needs
    home_url ?
    kamaljaiswal
    @kamaljaiswal
    will start fresh and check the same .thanks . do_auth_token: "YOUR_DIGITALOCEAN_AUTH_TOKEN" is token created in Digital Ocean Application & API section Token/Keys
    kamaljaiswal
    @kamaljaiswal
    TASK [git] Getting any error *
    fatal: [reaction.server]: FAILED! => {"before": "c2d8d21f20a0066e5c9c0fb7ed7273f0feadca8f", "changed": false, "msg": "Local modifications exist in repository (force=no)."}
    to retry, use: --limit @/root/wk_reaction/proxy-traefik/playbooks/reaction.retry.
    Loan Laux
    @loan-laux
    @kamaljaiswal Looks like you have local modifications made to your Reaction API repo. Try to manually git pull trunk and see if you’ve conflicts.
    kamaljaiswal
    @kamaljaiswal
    As I need to modify do_auth_token: "YOUR_DIGITALOCEAN_AUTH_TOKEN"
    domain: "YOUR_DOMAIN"
    email: "YOUR_EMAIL" @loan-laux thanks for response
    in reaction.yml
    again same error after git pull .. shall I force = yes TASK [git] *
    fatal: [reaction.server]: FAILED! => {"before": "c2d8d21f20a0066e5c9c0fb7ed7273f0feadca8f", "changed": false, "msg": "Local modifications exist in repository (force=no)."}
    to retry, use: --limit @/root/wk_reaction/proxy-traefik/playbooks/reaction.retry
    kamaljaiswal
    @kamaljaiswal

    TASK [git] *
    changed: [reaction.server]

    TASK [git] *
    changed: [reaction.server]
    force: yes it by passes

    TASK [Create Docker network named web] *
    fatal: [reaction.server]: FAILED! => {"changed": true, "cmd": ["docker", "network", "create", "web"], "delta": "0:00:00.296365", "end": "2020-07-16 07:48:03.436204", "msg": "non-zero return code", "rc": 1, "start": "2020-07-16 07:48:03.139839", "stderr": "Error response from daemon: network with name web already exists", "stderr_lines": ["Error response from daemon: network with name web already exists"], "stdout": "", "stdout_lines": []}
    to retry, use: --limit @/root/wk_reaction/proxy-traefik/playbooks/reaction.retry
    there is no code folder "reaction/reaction-development-p" inside proxy-traefik/reaction ?
    Ankur Pata
    @ankurpata
    the script creates a new user 'reaction'
    and sets up everything in that dir - /home/reaction/
    kamaljaiswal
    @kamaljaiswal
    thanks checking the same .
    kamaljaiswal
    @kamaljaiswal
    thanks ignore_error = yes had to be used . How to configure https self signed cert / authority in reaction
    Ankur Pata
    @ankurpata
    You need a domain name unfortunately
    for hydra service
    kamaljaiswal
    @kamaljaiswal
    domain I have ..http://buyfresh.info:4000/ yet to configure for https ?
    struggling with hydra ....as all routes failing ...any help would be appreciated
    Loan Laux
    @loan-laux
    @kamaljaiswal Paste your Hydra logs on here
    kamaljaiswal
    @kamaljaiswal
    _app.js:19 WebSocket connection to 'wss://api.buyfresh.info/graphql' failed: Error in connection establishment: net::ERR_CERT_AUTHORITY_INVALID
    e.connect @ _app.js:19
    cdn.segment.com/analytics.js/v1/ENTER_KEY_HERE/analytics.min.js:1 Failed to load resource: the server responded with a status of 404 ()
    3_app.js:19 WebSocket connection to 'wss://api.buyfresh.info/graphql' failed: Error in connection establishment: net::ERR_CERT_AUTHORITY_INVALID
    e.connect @ _app.js:19
    5_app.js:19 WebSocket connection to 'wss://api.buyfresh.info/graphql' failed: Error in connection establishment: net::ERR_CERT_AUTHORITY_INVALID
    459399283ce425e792b7f861983b938b511d7438.js?meteor_js_resource=true:472 WebSocket connection to 'wss://api.buyfresh.info/graphql' failed: Error in connection establishment: net::ERR_CERT_AUTHORITY_INVALID
    e.connect @ 459399283ce425e792b7f861983b938b511d7438.js?meteor_js_resource=true:472
    api.buyfresh.info/locales/namespaces.json:1 Failed to load resource: net::ERR_CERT_AUTHORITY_INVALID
    459399283ce425e792b7f861983b938b511d7438.js?meteor_js_resource=true:729 Uncaught (in promise) TypeError: Failed to fetch
    459399283ce425e792b7f861983b938b511d7438.js?meteor_js_resource=true:472 WebSocket connection to 'wss://api.buyfresh.info/graphql' failed: Error in connection establishment: net::ERR_CERT_AUTHORITY_INVALID
    e.connect @ 459399283ce425e792b7f861983b938b511d7438.js?meteor_js_resource=true:472
    459399283ce425e792b7f861983b938b511d7438.js?meteor_js_resource=true:404 INFO [react-context-oidc] : Protection : true
    459399283ce425e792b7f861983b938b511d7438.js?meteor_js_resource=true:404 INFO [react-context-oidc] : Protected component mounted
    hydra.buyfresh.info/.well-known/openid-configuration:1 Failed to load resource: net::ERR_CERT_AUTHORITY_INVALID
    459399283ce425e792b7f861983b938b511d7438.js?meteor_js_resource=true:404 Uncaught (in promise) Error: Network Error
    at XMLHttpRequest.a.onerror (459399283ce425e792b7f861983b938b511d7438.js?meteor_js_resource=true:404)
    5459399283ce425e792b7f861983b938b511d7438.js?meteor_js_resource=true:472 WebSocket connection to 'wss://api.buyfresh.info/graphql' failed: Error in connection establishment: net::ERR_CERT_AUTHORITY_INVALID
    e.connect @ 459399283ce425e792b7f861983b938b511d7438.js?meteor_js_resource=true:472
    459399283ce425e792b7f861983b938b511d7438.js?meteor_js_resource=true:472 WebSocket connection to 'wss://api.buyfresh.info/graphql' failed: Error in connection establishment: net::ERR_CE
    @loan-laux Thanks for response logs for admin / store front
    Only added the "Token " in reaction.yml file for hydra
    Loan Laux
    @loan-laux
    That’s not the logs for the Hydra container though, is it?
    kamaljaiswal
    @kamaljaiswal
    sorry for being novice ....new to this .. are u hinting at docker logs ... Please let me know will enable the same
    Loan Laux
    @loan-laux
    Yes, the Docker logs for the Hydra container, sorry for not being specific
    kamaljaiswal
    @kamaljaiswal
    sure thanks for ur support.
    kamaljaiswal
    @kamaljaiswal
    Subscribe now: http://eepurl.com/di390P <<
    time="2020-07-16T13:46:05Z" level=info msg="Software quality assurance features are enabled. Learn more at: https://www.ory.sh/docs/ecosystem/sqa"
    time="2020-07-16T13:46:05Z" level=info msg="Setting up http server on :4445"
    time="2020-07-16T13:46:05Z" level=warning msg="HTTPS disabled. Never do this in production."
    time="2020-07-16T13:46:05Z" level=info msg="Setting up http server on :4444"
    time="2020-07-16T13:46:05Z" level=warning msg="HTTPS disabled. Never do this in production."
    time="2020-07-16T13:46:35Z" level=info msg="started handling request" method=GET remote="192.168.32.7:32948" request=/clients/reaction-admin
    time="2020-07-16T13:46:35Z" level=info msg="completed handling request" measure#hydra/admin: https://hydra.buyfresh.info/.latency=40891428 method=GET remote="192.168.32.7:32948" request=/clients/reaction-admin status=200 text_status=OK took=40.891428ms
    time="2020-07-16T13:46:35Z" level=info msg="started handling request" method=PUT remote="192.168.32.7:32950" request=/clients/reaction-admin
    time="2020-07-16T13:46:35Z" level=info msg="completed handling request" measure#hydra/admin: https://hydra.buyfresh.info/.latency=20472469 method=PUT remote="192.168.32.7:32950" request=/clients/reaction-admin status=200 text_status=OK took=20.472469ms
    time="2020-07-16T13:46:36Z" level=info msg="started handling request" method=GET remote="192.168.32.8:37452" request=/clients/example-storefront
    time="2020-07-16T13:46:36Z" level=info msg="completed handling request" measure#hydra/admin: https://hydra.buyfresh.info/.latency=1595365 method=GET remote="192.168.32.8:37452" request=/clients/example-storefront status=200 text_status=OK took=1.595365ms
    time="2020-07-16T13:46:36Z" level=info msg="started handling request" method=PUT remote="192.168.32.8:37454" request=/clients/example-storefront
    time="2020-07-16T13:46:36Z" level=info msg="completed handling request" measure#hydra/admin: https://hydra.buyfresh.info/.latency=139490293 method=PUT remote="192.168.32.8:37454" request=/clients/example-storefront status=200 text_status=OK took=139.490293ms