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

Widget for services are not working #71

Closed
AuthorShin opened this issue Sep 8, 2022 · 4 comments
Closed

Widget for services are not working #71

AuthorShin opened this issue Sep 8, 2022 · 4 comments

Comments

@AuthorShin
Copy link

AuthorShin commented Sep 8, 2022

Hello
widget for services are not working.

Logs:

Listening on port 3000
services.yaml was copied to the config folder
bookmarks.yaml was copied to the config folder
widgets.yaml was copied to the config folder
docker.yaml was copied to the config folder
YAMLException: end of the stream or a document separator is expected (14:1)

 11 | #     customdata:
 12 | #       url: https://startpage. ...
 13 | #       abbr: G # Can be omitte ...
 14 | widget:
------^
 15 |   type: speedtest
 16 |   url: http://192.168.1.4:8261
    at generateError (file:///app/node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/dist/js-yaml.mjs:1273:10)
    at throwError (file:///app/node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/dist/js-yaml.mjs:1277:9)
    at readDocument (file:///app/node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/dist/js-yaml.mjs:2735:5)
    at loadDocuments (file:///app/node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/dist/js-yaml.mjs:2778:5)
    at Object.load$1 [as load] (file:///app/node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/dist/js-yaml.mjs:2804:19)
    at handler (/app/.next/server/pages/api/widgets.js:53:69)
    at async Object.apiResolver (/app/node_modules/.pnpm/next@12.2.5_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/server/api-utils/node.js:184:9)
    at async NextNodeServer.runApi (/app/node_modules/.pnpm/next@12.2.5_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/server/next-server.js:403:9)
    at async Object.fn (/app/node_modules/.pnpm/next@12.2.5_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/server/base-server.js:493:37)
    at async Router.execute (/app/node_modules/.pnpm/next@12.2.5_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/server/router.js:222:36) {
  reason: 'end of the stream or a document separator is expected',
  mark: {
    name: null,
    buffer: '# For configuration options and examples, please see:\n' +
      '# https://github.com/benphelps/homepage/wiki/Information-Widgets\n' +
      '\n' +
      '- resources:\n' +
      '    cpu: true\n' +
      '    memory: true\n' +
      '    disk: /\n' +
      '# - search: # Searchbar in widgets area\n' +
      '#     provider: custom # Can be google, duckduckgo, bing or custom.\n' +
      '#     target: _blank # Can be _blank, _top, _self or _parent.\n' +
      '#     customdata:\n' +
      '#       url: https://startpage.com/search?q= # Required for custom provider. Remember to add the q param as per your provider.\n' +
      '#       abbr: G # Can be omitted. Only the first 2 characters will be considered.\n' +
      'widget:\n' +
      '  type: speedtest\n' +
      '  url: http://192.168.1.4:8261\n',
    position: 573,
    line: 13,
    column: 0,
    snippet: ' 11 | #     customdata:\n' +
      ' 12 | #       url: https://startpage. ...\n' +
      ' 13 | #       abbr: G # Can be omitte ...\n' +
      ' 14 | widget:\n' +
      '------^\n' +
      ' 15 |   type: speedtest\n' +
      ' 16 |   url: http://192.168.1.4:8261'
  }
}
YAMLException: end of the stream or a document separator is expected (14:1)

 11 | #     customdata:
 12 | #       url: https://startpage. ...
 13 | #       abbr: G # Can be omitte ...
 14 | widget:
------^
 15 |   type: speedtest
 16 |   url: http://192.168.1.4:8261
    at generateError (file:///app/node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/dist/js-yaml.mjs:1273:10)
    at throwError (file:///app/node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/dist/js-yaml.mjs:1277:9)
    at readDocument (file:///app/node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/dist/js-yaml.mjs:2735:5)
    at loadDocuments (file:///app/node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/dist/js-yaml.mjs:2778:5)
    at Object.load$1 [as load] (file:///app/node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/dist/js-yaml.mjs:2804:19)
    at handler (/app/.next/server/pages/api/widgets.js:53:69)
    at async Object.apiResolver (/app/node_modules/.pnpm/next@12.2.5_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/server/api-utils/node.js:184:9)
    at async NextNodeServer.runApi (/app/node_modules/.pnpm/next@12.2.5_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/server/next-server.js:403:9)
    at async Object.fn (/app/node_modules/.pnpm/next@12.2.5_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/server/base-server.js:493:37)
    at async Router.execute (/app/node_modules/.pnpm/next@12.2.5_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/server/router.js:222:36) {
  reason: 'end of the stream or a document separator is expected',
  mark: {
    name: null,
    buffer: '# For configuration options and examples, please see:\n' +
      '# https://github.com/benphelps/homepage/wiki/Information-Widgets\n' +
      '\n' +
      '- resources:\n' +
      '    cpu: true\n' +
      '    memory: true\n' +
      '    disk: /\n' +
      '# - search: # Searchbar in widgets area\n' +
      '#     provider: custom # Can be google, duckduckgo, bing or custom.\n' +
      '#     target: _blank # Can be _blank, _top, _self or _parent.\n' +
      '#     customdata:\n' +
      '#       url: https://startpage.com/search?q= # Required for custom provider. Remember to add the q param as per your provider.\n' +
      '#       abbr: G # Can be omitted. Only the first 2 characters will be considered.\n' +
      'widget:\n' +
      '  type: speedtest\n' +
      '  url: http://192.168.1.4:8261\n',
    position: 573,
    line: 13,
    column: 0,
    snippet: ' 11 | #     customdata:\n' +
      ' 12 | #       url: https://startpage. ...\n' +
      ' 13 | #       abbr: G # Can be omitte ...\n' +
      ' 14 | widget:\n' +
      '------^\n' +
      ' 15 |   type: speedtest\n' +
      ' 16 |   url: http://192.168.1.4:8261'
  }
}
Listening on port 3000

@benphelps
Copy link
Member

You're missing a level of indentation on your widget block.

@benphelps
Copy link
Member

It should be like this,

- My Second Group:
    - My Second Service:
        href: http://192.168.1.4:8261/
        description: Speedtest Tracker
        widget:
            type: speedtest
            url: http://192.168.1.4:8261

@AuthorShin
Copy link
Author

Thank you.

Copy link
Contributor

github-actions bot commented Feb 6, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new discussion for related concerns.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants