magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.55k stars 9.32k forks source link

Unable to add a new shipping-address in the checkout process. #7340

Closed tirgil61 closed 7 years ago

tirgil61 commented 8 years ago

If i try to add a new shipping address in the checkout process, there is this error: Error occurred during "shipping_address" processing. Error occurred during "save_in_address_book" processing. Invalid type for value: "1". Expected Type: "int".

Preconditions

  1. Environment: Magento 2.1.2 without sample data is installed, PHP Version 7.0.7, mysql56

Steps to reproduce

  1. Create a new User withou any shipping or billing address
  2. Login with this User
  3. Add one product in the shopping cart
  4. Go to checkout
  5. Fill in the shipping address
  6. Choose one shipping method
  7. Try to go on but this error is shown: Error occurred during "shipping_address" processing. Error occurred during "save_in_address_book" processing. Invalid type for value: "1". Expected Type: "int".

Expected result

  1. The payment methods should be shown

Actual result

  1. Can not go on with order because of the error: Error occurred during "shipping_address" processing. Error occurred during "save_in_address_book" processing. Invalid type for value: "1". Expected Type: "int".

bildschirmfoto 2016-11-07 um 14 42 20 bildschirmfoto 2016-11-07 um 14 42 28

vincenzo84 commented 8 years ago

Hello everyone, I also get the same problem, to be more precise I am attaching the post request parameters:

{"addressInformation": {"shipping_address": {"countryId":"IT","regionId":"571","regionCode":"NA","region":"Napoli","street":["testq"],"company":"","telephone":"123465","postcode":"80058","city":"napoli","firstname":"Test","lastname":"Test","vatId":"","save_in_address_book":true}, "billing_address": {"countryId":"IT","regionId":"571","regionCode":"NA","region":"Napoli","street":["testq"],"company":"","telephone":"123465","postcode":"80058","city":"napoli","firstname":"Test","lastname":"Test","vatId":"","save_in_address_book":true,"saveInAddressBook":null}, "shipping_method_code":"bestway", "shipping_carrier_code":"tablerate" } }

vishveskrish commented 7 years ago

Hey,

We are also facing same issue. Does any one get the resolution ? saveinshipping

Does any one get the solution?

docus commented 7 years ago

Have the same issue

devsiteau commented 7 years ago

I am also experiencing the same problem. Any updates on this?

devsiteau commented 7 years ago

I have upgraded from 2.1.0 to 2.1.2 and still experiencing the same issue but only when logged in. If user is not logged in checkout works fine. I believe its a 400 error that means the data sent from the browser to magento is invalid however I cannot bug it.

SerhiyShkolyarenko commented 7 years ago

@tirgil61 @docus @devsiteau @vishveskrish @vincenzo84 thank you for reporting the issue! I performed these steps on the fresh magento 2.1.2 and it worked fine.

Experiment 2. I installed 2.1.0, created a product, created a user and placed order for him. I upgraded to 2.1.2 I created another user and checkout worked fine for him. Order was placed successfully.

Please, provide me more details on reproducing the issue. Which additional configuration changes did you do? Which payment and shipping methods are enabled? Do you use fresh installed Magento 2.1.2 or upgraded from another version? Which?

vishveskrish commented 7 years ago

@SerhiyShkolyarenko : Yes, I have upgraded store from 2.0.2 to 2.1.2. We are still facing an issue.

SerhiyShkolyarenko commented 7 years ago

@vishveskrish I performed the following steps:

  1. Installed v.2.0.2
  2. Created a product
  3. Registered customer on frontend
  4. Added product to cart
  5. Upgraded to 2.1.2
  6. Went to checkout(session didn't expire)
  7. Passed checkout successfully.
  8. Logged out
  9. Registered another customer on frontend.
  10. Added product to cart.
  11. Passed checkout successfully.

Do you have any issues when you pass this flow? Which payment and shipping methods are enabled on your instance?

butkom commented 7 years ago

with the transition to version 2.1 changes were made in shipping.js file. For example: 2.0.9 - 2.1.2

If you have defined it in his subject and made the transition - may have problems

magento-engcom-team commented 7 years ago

@tirgil61, thank you for your report. We were not able to reproduce this issue by following the steps you provided. If you'd like to update it, please reopen the issue.

baddwin commented 6 years ago

Hi, I got the same issue in M 2.2.4 sometimes, but with a custom shipping module.

the issue is occurred for logged in user, when adding a new address and don't check the checkbox to save it. screenshot_20180711_085050

the issue still occurred after edit that address, and check the checkbox. But when the user restart the checkout process, I mean, go back to other page and then go to checkout again, and then try to add a new address without un-check the Save to address book checkbox, it works well, and the issue don't appear.

VivekShingala commented 6 years ago

I think this error occurs when we have API or Model interface with different data types. For instance, in our interface declaration, we have a getter and setter with return type and input type as int and in the layout xml file we have not defined the dataType which is text by default.

We should have a compatible dataType in xml file as well. For example, any dataType from below.

`

text date number boolean select

`

Hope this helps.