Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUDI-6755] Uncaught DOMException: Failed to execute 'btoa' on 'Window': The string to be encoded contains characters outside of the Latin1 range. #7848

Open
v3ss0n opened this issue Sep 19, 2022 · 10 comments
Labels
avalanche OSS team bug Something isn't working env - production Bug found in production linear Low priority Created by Linear-GitHub Sync

Comments

@v3ss0n
Copy link

v3ss0n commented Sep 19, 2022

Hosting

  • Self
    • Method:
    • Budibase Version:
    • App Version:
  • Cloud
    • Tenant ID:

Describe the bug
Uncaught DOMException: Failed to execute 'btoa' on 'Window': The string to be encoded contains characters outside of the Latin1 range.

It seems that accours when stage is persisted and it incudes and emoji. I used a button to set emoji as state that used to filter table , after that all the tables linked rows cannot be clicked , failing with above error.

After clearing all site data , and removing the button it fixed .

SO Answer here : https://stackoverflow.com/questions/23223718/failed-to-execute-btoa-on-window-the-string-to-be-encoded-contains-characte
To Reproduce
Steps to reproduce the behavior:
1 Make a button
2. Define Action to Set an Emoji
3 . Make it persist
Expected behavior
Works without failing

Screenshots
its gone now

App Export
If possible - please attach an export of your budibase application for debugging/reproduction purposes.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

BUDI-6755

@v3ss0n v3ss0n added the bug Something isn't working label Sep 19, 2022
@v3ss0n
Copy link
Author

v3ss0n commented Sep 26, 2022

it stills exist , it was fixed because i stop using emoji icon in states.

@liongkj
Copy link

liongkj commented Dec 19, 2022

Im also facing this bug when i click a button to open a modal (/modal_export). it was working fine previously

*edit, all my buttons that open a modal have this error

@VenSlazer
Copy link

I'm also having this problem when I try to open a modal in Google Chrome on my MacBook Pro M1. Other browsers and Google Chrome on Windows don't have this problem.

@liongkj
Copy link

liongkj commented Mar 10, 2023

its actually a encoding issue. (Vietnamese in my case), just need to encode and decode the characters

@VenSlazer
Copy link

@liongkj to out myself as a complete noob: how would I do that if I run Budibase in a Docker container?

@liongkj
Copy link

liongkj commented Mar 10, 2023

const a = $("plant provider.Rows")
const b = a.filter(x=>x.id == $("Field Value"))[0].name
const c = encodeURI(b)
console.log(c)
return c

this is a frontend error, ntg to do with the server

@VenSlazer
Copy link

VenSlazer commented Mar 10, 2023

const a = $("plant provider.Rows")
const b = a.filter(x=>x.id == $("Field Value"))[0].name
const c = encodeURI(b)
console.log(c)
return c

this is a frontend error, ntg to do with the server

@liongkj In My Case, this does not seem to work. I'm trying to open a screen in a modal. Depending on the following JS-Script, a different modal should appear:

let urlTarget;

switch (true) {
	case $("Repeater.Standard_Projekte.Leistungsphase").includes('LP'):
		urlTarget = '/planungsstand-lp';
		break;
	case $("Repeater.Standard_Projekte.Leistungsphase").includes('GES'):
		urlTarget = '/planungsstand-ges';
		break;
	case $("Repeater.Standard_Projekte.Leistungsphase").includes('SH'):
		urlTarget = 'planungsstand-sh';
		break;
	case $("Repeater.Standard_Projekte.Leistungsphase").includes('PH'):
		urlTarget = '/planungsstand-ph';
		break;
	case $("Repeater.Standard_Projekte.Leistungsphase").includes('NT'):
		urlTarget = '/planungsstand-nt';
		break;
	default:
		urlTarget = '/planungsstand';
		break;
}
return encodeURI(urlTarget)

Running this Code still results in the Error from above. It works on Safari, Firefox and even in Microsoft Edge, which should basically be the same as Google Chrome.

@melohagan
Copy link
Collaborator

Another user came across this: #10023 (reply in thread)

Going to re-open to see if there's anything that could done, even if it's a matter of making the error visible and clear to the user.

@melohagan melohagan reopened this Mar 15, 2023
@melohagan melohagan changed the title Uncaught DOMException: Failed to execute 'btoa' on 'Window': The string to be encoded contains characters outside of the Latin1 range. [BUDI-6755] Uncaught DOMException: Failed to execute 'btoa' on 'Window': The string to be encoded contains characters outside of the Latin1 range. Mar 15, 2023
@stale
Copy link

stale bot commented May 21, 2023

This issue has been automatically marked as stale because it has not had recent activity.

@stale stale bot added the stale label May 21, 2023
@melohagan melohagan added the avalanche OSS team label May 23, 2023
@stale stale bot removed the stale label May 23, 2023
@melohagan melohagan added the Low priority Created by Linear-GitHub Sync label Nov 10, 2023
@offbase-solutions
Copy link

Still having the same problem after almost a year, any word on this. Really a show stopper.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
avalanche OSS team bug Something isn't working env - production Bug found in production linear Low priority Created by Linear-GitHub Sync
Projects
None yet
Development

No branches or pull requests

6 participants