Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

[BUG] Register Form only working on port 443 or 80 not on 3000 #859

Closed
beardcoder opened this issue Jun 16, 2020 · 3 comments · Fixed by #876
Closed

[BUG] Register Form only working on port 443 or 80 not on 3000 #859

beardcoder opened this issue Jun 16, 2020 · 3 comments · Fixed by #876
Assignees
Labels
bug Something isn't working
Milestone

Comments

@beardcoder
Copy link

Describe the bug

The registration do not work. Always get the message "Cannot create a new account, the user may already exist"

  • New Demo instance from Shopware
  • Canary and Stable version of PWA
  • Open PWA and click register
  • Fill out the form (tried with various data)

Additional context

  • Docker ddev setup
  • Demo Shopware developer Edition
  • PWA Integration 0.1.3
  • Canary and Stable version of PWA

Request

curl 'https://pwa.ddev.site/store-api/v1/account/register' \
  -H 'authority: pwa.ddev.site' \
  -H 'accept: application/json, text/plain, */*' \
  -H 'sw-access-key: SWSCAELOSVLRC1ZAEMTKAKPMTG' \
  -H 'sw-context-token: YWdofdtbysvt25x62PVMEpDDvRW3WTXZ' \
  -H 'sw-language-id: 2fbb5fe2e29a4d70aa5854ce7ce3e20b' \
  -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36' \
  -H 'content-type: application/json;charset=UTF-8' \
  -H 'origin: https://pwa.ddev.site:3000' \
  -H 'sec-fetch-site: same-site' \
  -H 'sec-fetch-mode: cors' \
  -H 'sec-fetch-dest: empty' \
  -H 'referer: https://pwa.ddev.site:3000/' \
  -H 'accept-language: de-DE,de;q=0.9,en-US;q=0.8,en;q=0.7' \
  --data-binary '{"firstName":"Beard","lastName":"Coder","email":"beardcoder@gmail.com","password":"1234567890ß","salutationId":"9c249646be1e4a84b3ef1b08c08c4411","storefrontUrl":"https://pwa.ddev.site:3000","billingAddress":{"firstName":"Beard","salutationId":"9c249646be1e4a84b3ef1b08c08c4411","lastName":"Coder","city":"Hopfenstadt","street":"Bierstraße 5","zipcode":"96385","countryId":"fbbded156cb94f34a640dae2fbc6fb43"}}' \
  --compressed

Response

{
    "errors": [
        {
            "code": "VIOLATION::NO_SUCH_CHOICE_ERROR",
            "status": "400",
            "title": "Constraint violation error",
            "detail": "The value you selected is not a valid choice.",
            "source": {
                "pointer": "\\/storefrontUrl"
            },
            "meta": {
                "parameters": {
                    "{{ value }}": "\\u0022https:\\/\\/pwa.ddev.site:3000\\u0022",
                    "{{ choices }}": "\\u0022https:\\/\\/pwa.ddev.site\\u0022"
                }
            }
        }
    ]
}

Bildschirmfoto 2020-06-16 um 08 52 29

@beardcoder beardcoder added the bug Something isn't working label Jun 16, 2020
@beardcoder
Copy link
Author

The problem is the Port. You can not set the port in the sales chanel.

@beardcoder beardcoder changed the title [BUG] Register Form not working [BUG] Register Form only working on port 443 or 80 not on 3000 Jun 16, 2020
@akrajna
Copy link
Collaborator

akrajna commented Jun 18, 2020

The registration works on https://shopware-pwa-canary.storefrontcloud.io/
RegistrationOnCanary
It does not work on https://shopware-pwa.storefrontcloud.io/
RegistrationShopwarePwa

@beardcoder
Copy link
Author

Yes if you not working with the port from the documentation. You can not set a port in a saleschannel.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants