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

Doesn't seem to be working (remote server) #78

Open
CactiChameleon9 opened this issue Nov 8, 2020 · 7 comments
Open

Doesn't seem to be working (remote server) #78

CactiChameleon9 opened this issue Nov 8, 2020 · 7 comments
Labels
bug Something isn't working

Comments

@CactiChameleon9
Copy link

CactiChameleon9 commented Nov 8, 2020

Describe the bug
Mycroft GUI does not seem to work properly with a remote mycroft server

To Reproduce
Steps to reproduce the behavior:

  1. Change the setting to a non-local server, and error are produced frequently saying it cannot access the pairing file

Expected behavior
It should all work properly

Log files
Client end running log:

QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-daniel'
QtWebEngine::initialize() called with QCoreApplication object already created and should be call before. This is depreciated and may fail in the future.
Attribute Qt::AA_ShareOpenGLContexts must be set before QCoreApplication is created.
Cyclic dependency detected between "file:///usr/lib/qt/qml/org/kde/kirigami.2/Units.qml" and "file:///usr/lib/qt/qml/org/kde/kirigami.2/Units.qml"
file:///usr/lib/qt/qml/org/kde/kirigami.2/styles/Material/Theme.qml:14:1: QML Theme: Binding loop detected for property "textColor"
qrc:/main.qml:297:17: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
qrc:/qml/StatusIndicator.qml:165:5: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
qrc:/qml/SkillView.qml:55:5: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
qrc:/RemoteStt.qml:34:5: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
qrc:/main.qml:329:21: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
file:///usr/lib/qt/qml/org/kde/kirigami.2/templates/AbstractApplicationHeader.qml:153:9: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
file:///usr/lib/qt/qml/org/kde/kirigami.2/templates/AbstractApplicationHeader.qml:83:5: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
file:///usr/lib/qt/qml/org/kde/kirigami.2/templates/AbstractApplicationHeader.qml:102:9: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
qrc:/main.qml:101:5: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
qrc:/main.qml:60:5: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
file:///usr/lib/qt/qml/org/kde/kirigami.2/templates/OverlayDrawer.qml:291:5: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
file:///usr/lib/qt/qml/org/kde/kirigami.2/private/globaltoolbar/PageRowGlobalToolBarUI.qml:50:9: QML PrivateActionToolButton: Binding loop detected for property "checkable"
file:///usr/lib/qt/qml/org/kde/kirigami.2/templates/AbstractApplicationHeader.qml:153:9: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
file:///usr/lib/qt/qml/org/kde/kirigami.2/templates/AbstractApplicationHeader.qml:102:9: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
file:///usr/lib/qt/qml/org/kde/kirigami.2/templates/AbstractApplicationHeader.qml:83:5: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
qml: Trying to connect to Mycroft
qrc:/main.qml:38:5: Unable to assign [undefined] to int
qrc:/main.qml:37:5: Unable to assign [undefined] to int
qrc:/main.qml:36:5: Unable to assign [undefined] to int
qrc:/main.qml:35:5: Unable to assign [undefined] to int
qrc:/main.qml:34:5: Unable to assign [undefined] to int
qrc:/main.qml:33:5: Unable to assign [undefined] to int
qrc:/main.qml:249:17: Unable to assign null to QStringList
file:///usr/lib/qt/qml/org/kde/kirigami.2/GlobalDrawer.qml:493:33: QML GlobalDrawerActionItem: Binding loop detected for property "implicitWidth"
file:///usr/lib/qt/qml/org/kde/kirigami.2/GlobalDrawer.qml:493:33: QML GlobalDrawerActionItem: Binding loop detected for property "implicitWidth"
file:///usr/lib/qt/qml/org/kde/kirigami.2/GlobalDrawer.qml:493:33: QML GlobalDrawerActionItem: Binding loop detected for property "implicitWidth"
qrc:/main.qml:38:5: Unable to assign [undefined] to int
qrc:/main.qml:37:5: Unable to assign [undefined] to int
qrc:/main.qml:36:5: Unable to assign [undefined] to int
qrc:/main.qml:35:5: Unable to assign [undefined] to int
qrc:/main.qml:34:5: Unable to assign [undefined] to int
qrc:/main.qml:33:5: Unable to assign [undefined] to int
qrc:/main.qml:249:17: Unable to assign null to QStringList
Main Socket connected, trying to connect gui
Received port 18181 for gui "{1a994bb0-4209-49aa-abe2-29cde7ae3561}"
qrc:/qml/SkillView.qml:216:21: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
ERROR Loading QML file QUrl("file:///mnt/dietpi_userdata/mycroft-data/skills/mycroft-pairing.mycroftai/ui/pairing_start.qml")
"file:///mnt/dietpi_userdata/mycroft-data/skills/mycroft-pairing.mycroftai/ui/pairing_start.qml: No such file or directory"
ERROR Loading QML file QUrl("file:///mnt/dietpi_userdata/mycroft-data/skills/mycroft-pairing.mycroftai/ui/pairing.qml")
"file:///mnt/dietpi_userdata/mycroft-data/skills/mycroft-pairing.mycroftai/ui/pairing.qml: No such file or directory"
QQuickItem::stackBefore: Cannot stack Control_QMLTYPE_72_QML_85(0x55713ed77410, parent=0x55713f000ab0, geometry=0,0 713x374) before QQuickRepeater(0x55713efec950), which must be a sibling
qrc:/main.qml:292: TypeError: Cannot read property 'longDuration' of undefined
Current intent: ""

If you are running Mycroft, the Support Skill helps to automate gathering this information. Simply say "Create a support ticket" and the Skill will put together a support package and email it to you.

Environment (please complete the following information):

  • Client
  • Device type: Raspberry Pi 4
  • OS: Dietpi aarch64
  • Mycroft-core version: not sure, latest I think
  • Other versions: ?

Additional context
Fresh install, trying the start-mycroft.sh all manually doesn't help.
I think the issue is a client issue rather than a server issue, as the file trying to reference is there and it is stating that the syntax is wrong (I think)

Please think carefully about whether you have modified anything in Mycroft's code or configuration files. If so, can you reproduce this on a clean installation of Mycroft? Many "bugs" turn out to be non-standard configuration errors.

@CactiChameleon9 CactiChameleon9 added the bug Something isn't working label Nov 8, 2020
@forslund
Copy link
Contributor

forslund commented Nov 9, 2020

Hi, remote serving requires some tweaks on the device hosting mycroft-core. @AIIX has most experience of this but as I recall it the mycroft.conf need to be configured with a remote_url key with the external url. In addition an http server needs to be set up serving the /opt folder so a gui page is available at http://MY_EXTERNAL_URL/opt/mycroft/skills/THE_SKILL/ui/PAGE.qml

@CactiChameleon9
Copy link
Author

Why isn't that mentions in the README.md bit? any specific reason

@CactiChameleon9
Copy link
Author

CactiChameleon9 commented Nov 9, 2020

I think I know what I did wrong, mycroft-gui needs to be installed and running on the remote bit too?

@AIIX
Copy link
Collaborator

AIIX commented Nov 9, 2020

To run Mycroft Core remotely with Mycroft GUI on another device:

Remote System Hosting Mycroft Core:

  1. Install mycroft-core normally
  2. Install apache web server
  3. Create a soft link to /opt in /var/www/html/
  4. Add a "mycroft.conf" configuration file in /etc/mycroft/ (create folder if doesn't exist) with the following settings:
{
    "remote": true,
    "remote-server": "https://ip-or-name-address-where-mycroft-server-is-hosted/"
}

Host System Where Mycroft-GUI is hosted:

  1. open settings
  2. edit "ws://0.0.0.0" to "https://ip-or-name-address-where-mycroft-server-is-hosted/"
  3. click apply

@CactiChameleon9
Copy link
Author

Thank you so much that makes a ton more sense. I am using nginx, but the principle is the same. This also makes it easier to do remotely - my next plan of action. Is that safe to do with ssl/https?

@AIIX
Copy link
Collaborator

AIIX commented Nov 10, 2020

it should work with https fine I believe, what really matters is that the qml file path is readable/downloadable over the network

@CactiChameleon9
Copy link
Author

CactiChameleon9 commented Nov 11, 2020

OK, in theory I have done it all correctly - however it doesn't seem to be working? I now have a different error:
Mycroft is running but the connection failed for some reason. Kill Mycroft manually.

I had to do a bit of tweaking for my setup:
The config file I added to the end of (with the correct syntax, so inside the {} and removing the {} from what you gave me and adding a comma) of /mnt/dietpi_userdata/mycroft-core/mycroft/configuration/mycroft.conf

With nginx I made a folders in /var/www/mycroft/opt/mycroft(linkfolder), making an new nginx config based off the default one with /var/www/mycroft as the root, and I download a file from the directory structure listed (checked with ls to find a specific file to try)

Have I done anything wrong that you can see?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants