Comments (5)
Could you please send the Gluon code you're using?
from gluon.
Hi,
It's the gluworld index.js loading a different index.html
import * as Gluon from '@gluon-framework/gluon';
(async () => {
const browsers = process.argv.slice(2).filter(x => !x.startsWith('-'));
if (browsers.length > 0) { // use argv as browsers to use
for (const forceBrowser of browsers) {
await Gluon.open('../owntonePled/index.html', {
windowSize: [ 800, 500 ],
forceBrowser
});
}
return;
}
await Gluon.open('../../owntonePled/index.html', {
windowSize: [ 800, 500 ]
});
})();
Here's the code that makes the HTTP request
function curl(cmd, method='GET', headers={}, body='') {
return new Promise((resolve, reject) => {
const http = new XMLHttpRequest();
http.open(method, `${href}${cmd}`);
http.send();
http.onreadystatechange = function() {
if(this.readyState === 4) {
if(this.status === 200) {
resolve(http.responseText);
} else {
reject(new Error('Failed to load page, status code: ' + this.status));
}
}
};
});
};
from gluon.
I tried the gluworld code with this:
await Gluon.open('http://localhost:3000', {
allowHTTP: true,
windowSize: [ 800, 500 ]
});
and my app works as expected. So, it seems the HTTP limitation is in the gluon backend that hosts my web app?
I also tried :
Gluon.open('../owntonePled/index.html', {
windowSize: [ 800, 500 ],
forceBrowser
}
After clicking reload I get this console message:
file:///Users/blund/Documents/SW%20Development/gluon/examples/gluworld/node_modules/@gluon-framework/gluon/src/launcher/inject.js:64
let oldUrl = history.entries[history.currentIndex - 1].url;
^
TypeError: Cannot read properties of undefined (reading 'url') at file:///Users/blund/Documents/SW%20Development/gluon/examples/gluworld/node_modules/@gluon-framework/gluon/src/launcher/inject.js:64:64
at processTicksAndRejections (node:internal/process/task_queues:96:5)
from gluon.
Is any of your code using a .local URL? Also ensure that path in your code ../
is relative to your JS file, and that you're using the latest Gluon version.
from gluon.
Closing due to inactivity (and Discord should be used for support instead).
from gluon.
Related Issues (20)
- Window events
- Custom useragent HOT 1
- How do I package a Gluon app as a native exectuable? HOT 1
- Sample app crashing HOT 3
- Change behavior of deno branch to create 'gluon_data/chrome' in current directory HOT 1
- Thorium as a recommended gluon brower-base HOT 5
- Switch CDP -> WebDriver BiDi
- IPC will not be available after page refresh HOT 1
- Error on startup of first example HOT 6
- Links that open in new tab, don't open new browser in firefox, while in edge they do
- Add brower support
- Possible to Use Bundled Wep App (e.g. Vue) Instead of URL HOT 1
- Automatic browser failure fallback
- System installer
- CDP reply error.
- Using gluon on existing Node.js app
- ReCaptcha v2 doesnt work HOT 1
- Browser unsupported for nextcloud server site HOT 1
- Project Status HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gluon.