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

Fix AceEditor errors, or replace it with plain textbox #79

Open
dmitrizagidulin opened this issue Dec 23, 2022 · 1 comment
Open

Fix AceEditor errors, or replace it with plain textbox #79

dmitrizagidulin opened this issue Dec 23, 2022 · 1 comment
Assignees

Comments

@dmitrizagidulin
Copy link
Member

dmitrizagidulin commented Dec 23, 2022

To reproduce: Go to https://digitalcredentials.github.io/sandbox/ and enable browser console (e.g. Ctrl-Shift-i on linux).
Click on 'Sign Credential' button. Notice in the Console two errors:
Error one:

Unable to infer path to ace from script src, use ace.config.set('basePath', 'path') 
to enable dynamic loading of modes and themes or with webpack use ace/webpack-resolver

(this is likely similar issue to securingsincity/react-ace#766 )

Error two:

GET https://digitalcredentials.github.io/sandbox/mode-mode.js net::ERR_ABORTED 404

Note that on localhost, this error changes to:

Uncaught SyntaxError: Unexpected token '<' (at mode-mode.js:1:1)

Please fix these, as they are preventing console.log from running in signCredential() (for example, try putting a console.log('ISSUING') as the first line of signCredential() in local.ts. Notice that it does not fire, although the credential json is returned.).

Also, fix the Worker error (for example, by adding the following to the AceEditor component):

        setOptions={{
          useWorker: false
        }}

If no solution is found, please remove AceEditor, we can just use a plain textbox for the input.

@fields37
Copy link
Contributor

fields37 commented Jan 5, 2023

Hopefully resolved in #80

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

2 participants