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

Fetch api success on tabris test program but production aab/apk is not work #2254

Open
nozomi199 opened this issue Feb 28, 2023 · 3 comments
Labels

Comments

@nozomi199
Copy link

nozomi199 commented Feb 28, 2023

Dear all,

I have a javascript file that is load from outside, and pass it to Module.execute
I have tested on tabris.js dev/test program, but the same code is not work on my built file.
Would you have any idea to check and solve the problem, thanks for your help.

I'm using tabris 3.9 and the sample code is pasted below:

const {contentView, TextView, Module} = require('tabris');
async function main() {
    var url = 'https://some-valid.dummy/main.js';
    var a = await fetch(url);
    var b = await a.text();
    try {
        Module.execute(b, url);
    }catch(e) {
    }
}

main().catch(function(e) {
    //nothing to do
    new TextView({
        text:"Error",
        centerX: '0',
        centerY: '0',
        font: '36px',
    }).appendTo(contentView);
})

cheers,

Alan (a.k.a. summer)

@cookieguru
Copy link
Contributor

cookieguru commented Feb 28, 2023

What output or errors do you see? What output are you expecting?

@nozomi199
Copy link
Author

Dear cookieguru,

I'm expected my app script is loaded from internet and executed correctly with UI. For example, I have a example script with one TextView and append it to contentView, after loaded, the apps will be shown the TextView with text. But error occured.

I have traced the script.
And found out the following exeption:
TypeError: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
TypeError: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
at HttpRequest. (./node_modules/tabris/tabris.min.js:1:246263)
at notifyCallback (./node_modules/tabris/tabris.min.js:1:29231)
at HttpRequest.[notify] (./node_modules/tabris/tabris.min.js:1:28354)
at HttpRequest.$trigger (./node_modules/tabris/tabris.min.js:1:74212)
at HttpRequest._trigger (./node_modules/tabris/tabris.min.js:1:74161)
at Tabris._notify (./node_modules/tabris/tabris.min.js:1:86359)

And build script is using "tabris-connect-migration-guide" and built in github
https://github.com/eclipsesource/tabris-connect-migration-guide

cheers,
Alan (a.k.a summer)

@cookieguru
Copy link
Contributor

The message Trust anchor for certification path not found means there is a problem with your server configuration. You can see this post for more details. Also try opening the same URL in a web browser to see if there are still errors.

You can try using this URL, which is also https https://pastebin.com/raw/rFZUyMbZ

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

No branches or pull requests

2 participants