diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index 9b27d28a..0c7d3206 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -288,12 +288,19 @@ If you're serving Dashy though a CDN, instead of using the Node server or Docker ## Widget Errors +#### Find Error Message If an error occurs when fetching or rendering results, you will see a short message in the UI. If that message doesn't addequatley explain the problem, then you can [open the browser console](/docs/troubleshooting.md#how-to-open-browser-console) to see more details. +#### Check Config Before proceeding, ensure that if the widget requires auth your API is correct, and for custom widgets, double check that the URL and protocol is correct. +#### Timeout Error +If the error message in the console includes: `Error: timeout of 500ms exceeded`, then your Glances endpoint is slower to respond than expected. You can fix this by [setting timeout](https://github.com/Lissy93/dashy/blob/master/docs/widgets.md#setting-timeout) to a larger value. This is done on each widget, with the `timeout` attribute, and is specified in ms. E.g. `timeout: 5000` would only fail if no response is returned within 5 seconds. + +#### CORS error If the console message mentions to corss-origin blocking, then this is a CORS error, see: [Fixing Widget CORS Errors](#widget-cors-errors) +#### More Info If you're able to, you can find more information about why the request may be failing in the Dev Tools under the Network tab, and you can ensure your endpoint is correct and working using a tool like Postman. --- diff --git a/src/components/Widgets/WidgetBase.vue b/src/components/Widgets/WidgetBase.vue index e6f80c3a..7e714fad 100644 --- a/src/components/Widgets/WidgetBase.vue +++ b/src/components/Widgets/WidgetBase.vue @@ -476,7 +476,7 @@ export default { /* Returns users specified widget options, or empty object */ widgetOptions() { const options = this.widget.options || {}; - const timeout = this.widget.timeout || 500; + const timeout = this.widget.timeout || 2500; const useProxy = this.appConfig.widgetsAlwaysUseProxy || !!this.widget.useProxy; const updateInterval = this.widget.updateInterval !== undefined ? this.widget.updateInterval : null;