Anyone getting "Expected a number, but got a string" error?

Hi everyone,

I’ve had an app working perfectly for months now.

It has Zapier pass it some data via an API workflow - with, among other things, a number with the key “amount”

Starting today, without making any changes, I’m getting an “Expected a number, but got a string” error

Except, it’s definitely getting sent a number, not a string.

I even tested it via hurl.it with a number… and I still get the error.

Any ideas?

Yes, I got the same. Since the latest Bubble update. It happens when the JSON value sent is quoted, like this:

57

This will work:

05

Luckily it did not affect our production code, but all our tests written in Postman suddenly failed because we had not been consistent with this.

@emmanuel or @josh, I think you need to either revert this back to the old behaviour or make users aware of it, since it may break stuff in their apps.

Thanks @soeren. This feels like quite a big problem as, as far as I’m aware, Zapier doesn’t give me the option of how JSON calls are packaged up and sent.

I image some other apps don’t either?

Thoughts @emmanuel or @josh ?

We just fixed the number issue, sorry about this.

2 Likes

Thanks @emmanuel

As of today, I started receiving a similar message with the stripe.js plugin by @copilot to “Convert card into Stripetoken A”. The specific error message is “StripetokenA Error: Expected a string, but got a number.” I confirmed that the inputs are in fact strings.

It appears that the subsequent stripe operation being initiated by the event “When Stripetoken A for a card has been created” (in my case I am adding a stripe customer) still goes through, but the bubble site hangs on this initial error described above.

Note: I am experiencing this error in"version-test".

@emmanuel Is this an error in the bubble code as it was in the post above, or could I be doing something wrong on my end?

@copilot please let me know if I am doing anything wrong here. I was following the instructions here: https://cobubble.com/stripejs?tab=documentation and this was working fine as of last night, but today I started getting this error.

Thanks!

image

Hey @prestomailservices,

We weren’t able to reproduce this across Stripe.js and Stripe.js Plus. In the future, feel free to give us a shout directly through plugins@cobubble.com so we can respond sooner. If issues can be reproduced, we’re happy to reach out to Bubble on your behalf to find a solution and push an update as soon as possible. :slightly_smiling_face:

Hey @prestomailservices , did you find a solution to this?

It’s 2022 and I’m also having the same issue.

What’s the solution?

Yes It is till now!
This sensitive situation remains
Please, It is critical. As we all are working with numbers and we need “comma”.
Consider please that, in other countries (Such as South America, Europe) comma used to separate decimals, not thousands. So, it is urgently necessary.

Bubble, please, check out this screen error:
image
That “,70” is decimals in Brazil, really necessary.

Dear @emmanuel
Could you please give some help to ? We will be really grateful

Very sorry you’re having this issue! Can you file a bug report for this case? We’ll need to look at your application, and then the success team will be able to assist you.

Thanks!

1 Like

HI Emmanuel,
Great have your time in feedback here, thank you.

Actually is not an isolated problem on my app, as mentioned by me and other collegues on this forum we all have a exactly same issue already exposed since 2017, and remains. As you can see abouve the @biblebase.co comments

Bubble’s enviroment interprets a number with “comma” as a string, and then throws an error. Nothing different as reported since 2017/ 2020/ 2021.

Note: About “The bug reporting” sent by you. The process offers questions that isolate the issue as something local, which it is not. Also, it links to select “a single browser”, a single “operating system”, which in this case it would not be assertive to isolate either.

So, actually, I also sent an email to your support team, explaining everything, reporting the case, offering a link to this same post/forum.

The support team just have to try import data from CSV using columns with a filed type “number” and using "commas ". Remembering that, in Brazil for example, commas are important because they separate “decimals”.

Since this is a known problem, I hope they can help.
This moment my app is paused, I need offer a 100% accurated calculations (considering decimals)

Regards.