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

Trying to remove a thing sometimes doesn't #1013

Closed
dhylands opened this issue May 17, 2018 · 4 comments · Fixed by #2429
Closed

Trying to remove a thing sometimes doesn't #1013

dhylands opened this issue May 17, 2018 · 4 comments · Fixed by #2429
Assignees
Labels
Milestone

Comments

@dhylands
Copy link
Contributor

If I try to remove a thing which the thing-url-adapter can no longer talk to, then it fails.
I see the following in run-app.log:

2018-05-17 09:50:19.598 getValue for property on for: ESP32-RGB-LED returning true
2018-05-17 09:50:19.604 getValue for property color for: ESP32-RGB-LED returning #f9ff04
2018-05-17 09:50:21.615 thing-url: AddonManagerProxy: No such device: http---10.252.33.236-
2018-05-17 09:50:21.615 thing-url: AddonManagerProxy: Ignoring msg: { messageType: 'removeThing',
2018-05-17 09:50:21.616 thing-url:   data: 
2018-05-17 09:50:21.616 thing-url:    { deviceId: 'http---10.252.33.236-',
2018-05-17 09:50:21.616 thing-url:      adapterId: 'thing-url-adapter',
2018-05-17 09:50:21.616 thing-url:      pluginId: 'thing-url-adapter' } }

and on the web console I see:

Error removing thing Internal Server Error context-menu.js:74:9
	handleRemove/< webpack:///./static/js/context-menu.js?:74:9

Disabling the thing-url-adapter will cause the thing to be removed.

@mrstegeman
Copy link
Contributor

I'm unable to reproduce this. Was this with the latest gateway and thing-url-adapter?

@dhylands
Copy link
Contributor Author

I'll have to check exactly which versions I was using. I'll try to keep better track and see if I can up with a set of steps to reproduce this. I've run into this quite a few times recently while trying to work with the thing-url-adapter.

@sogaani
Copy link
Contributor

sogaani commented Jun 5, 2018

When the gateway try to pairing devices, thing-url-adapter remove device temporally and add device again.
https://github.com/mozilla-iot/thing-url-adapter/blob/master/thing-url-adapter.js#L448
Perhaps, If we try to remove thing between remove device and add device, we can reproduce this issue.

Maybe reproduce steps.

  • add url-thing
  • press + button on /things page
  • delete url-thing

@dhylands
Copy link
Contributor Author

dhylands commented Jun 5, 2018

I also run into this with the zigbee adapter. There, I think what happens is that the unpairing process gets started and never completes (and handleDeviceRemoved never gets called).

With the thing-url-adapter, if removing the device from the config fails, then it also doesn't call handleDeviceRemoved

@hobinjk hobinjk added the bug label Aug 3, 2018
@hobinjk hobinjk added this to the 0.6 milestone Aug 3, 2018
@benfrancis benfrancis removed this from the 0.6 milestone Aug 15, 2018
@mrstegeman mrstegeman added this to Product Backlog in WebThings Gateway Mar 26, 2019
@mrstegeman mrstegeman removed the backlog label Apr 3, 2019
mrstegeman added a commit to mrstegeman/gateway that referenced this issue Feb 11, 2020
In cases where removal and pairing cannot overlap, such as Z-Wave,
those cases need to be handled by the add-on.

Fixes WebThingsIO#1013
Fixes WebThingsIO#1252
@mrstegeman mrstegeman added this to the 0.12 milestone Feb 11, 2020
@mrstegeman mrstegeman self-assigned this Feb 11, 2020
mrstegeman added a commit to mrstegeman/gateway that referenced this issue Feb 11, 2020
In cases where removal and pairing cannot overlap, such as Z-Wave,
those cases need to be handled by the add-on.

Fixes WebThingsIO#1013
Fixes WebThingsIO#1252
mrstegeman added a commit to mrstegeman/gateway that referenced this issue Feb 11, 2020
In cases where removal and pairing cannot overlap, such as Z-Wave,
those cases need to be handled by the add-on.

Fixes WebThingsIO#1013
Fixes WebThingsIO#1252
mrstegeman added a commit to mrstegeman/gateway that referenced this issue Feb 12, 2020
In cases where removal and pairing cannot overlap, such as Z-Wave,
those cases need to be handled by the add-on.

Fixes WebThingsIO#1013
Fixes WebThingsIO#1252
mrstegeman added a commit to mrstegeman/gateway that referenced this issue Feb 12, 2020
In cases where removal and pairing cannot overlap, such as Z-Wave,
those cases need to be handled by the add-on.

Fixes WebThingsIO#1013
Fixes WebThingsIO#1252
mrstegeman added a commit to mrstegeman/gateway that referenced this issue Feb 12, 2020
mrstegeman added a commit to mrstegeman/gateway that referenced this issue Feb 12, 2020
WebThings Gateway automation moved this from Product Backlog to Done Feb 18, 2020
mrstegeman added a commit that referenced this issue Feb 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging a pull request may close this issue.

5 participants