The tile in cesium ion button used to work for me. Now it hangs:
I was wondering if anyone else has experienced the same?
I can curl "https://api.cesium.com/v1/assets" -H "Authorization: Bearer <your_access_token>" fine from the webapp container where the photos go. I have also tried creating and saving a new token.
I do note that if I run the API curl test using a particular windows build I get
curl: (60) SSL certificate problem: self signed certificate in certificate chain
More details here: https://curl.haxx.se/docs/sslcerts.html
curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.
@pierotofy running locally, I can see that the reason the Cesium ion plugin is failing is because it seems like the task fails to launch. Here’s the console output I see:
worker | [2020-05-12 13:43:25,652: ERROR/MainProcess] Received unregistered task of type 'plugins.cesium-ion.api_views.upload_to_ion'.
worker | The message has been ignored and discarded.
worker |
worker | Did you remember to import the module containing this task?
worker | Or maybe you're using relative imports?
worker |
worker | Please see
worker | http://docs.celeryq.org/en/latest/internals/protocol.html
worker | for more information.
worker |
worker | The full contents of the message body was:
worker | b'[["84e9b336-4841-4388-a29f-d2e88649499c", "POINTCLOUD", "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIyZjI5YjBkMS04ZDFlLTQzOTctOWRmYy02NWE5M2Y2MmQ4NTUiLCJpZCI6MTYyMywic2NvcGVzIjpbImFzbCIsImFzciIsImFzdyJdLCJpYXQiOjE1NjM0NzY5MDl9.xVpx6vhlcS_hZvUxWMjuGB3zmajcGKKlS3TFx-vpJeE", "/webodm/app/media/project/1/task/84e9b336-4841-4388-a29f-d2e88649499c/assets/odm_georeferencing/odm_georeferenced_model.laz", "First Project | Task of 2019-11-03T18:01:06.004Z \\u2060\\u2014 Pointcloud", "", "", {"baseTerrainId": "", "textureFormat": false}], {}, {"callbacks": null, "errbacks": null, "chain": null, "chord": null}]' (608b)
worker | Traceback (most recent call last):
worker | File "/usr/local/lib/python3.6/site-packages/celery/worker/consumer/consumer.py", line 559, in on_task_received
worker | strategy = strategies[type_]
worker | KeyError: 'plugins.cesium-ion.api_views.upload_to_ion'
But this task is registered here:
And the console output here implies it successfully registers the plugin:
webapp | INFO Initializing GRASS engine using /usr/bin/grass78
webapp | INFO Booting WebODM 1.3.6
webapp | INFO Registered [plugins.contours.plugin]
webapp | INFO Registered [plugins.cesium-ion.plugin]
webapp | INFO Registered [plugins.lightning.plugin]
webapp | INFO Registered [plugins.posm-gcpi.plugin]
webapp | INFO Registered [plugins.diagnostic.plugin]
webapp | INFO Registered [plugins.osm-quickedit.plugin]
webapp | INFO Registered [plugins.fullscreen.plugin]
webapp | INFO Registered [plugins.openaerialmap.plugin]
webapp | INFO Registered [plugins.cloudimport.plugin]
webapp | INFO Registered [plugins.measure.plugin]
So I’m not sure why it’s failing to find the task. Did something change recently in the way tasks must be registered?
I’m happy to submit a pull request, but I’m not sure why this is failing. It doesn’t seem like WebODM’s plugin architecture has changed recently. I also just tried it with a clean install on Windows, and it worked. Destroyed all containers and volumes back on my Linux and tried again, same Received unregistered task of type 'plugins.cesium-ion.api_views.upload_to_ion' error.
I am running windows 10 with linux docker containers. I seem to recall selecting this when installing docker originally, though the latest version doesn’t seem to have this as a choice.
Following your rinse and repeat experience with linux I do note that for me maybe the plugin stopped working after a ./webodm.sh update. I did not remove the Docker images and my existing WebODM projects were retained.
This isn’t a massive issue for us presently. Though I do note it gets a mention on your website WebODM – Cesium
Another plugin was having the same problem with Celery, and @pierotofy came up with a solution that should help all plugins (check the PR). If anyone here is tech-savy, you might be able to implement the same fix for the Cesium Ion plugin.
I got the cesium-ion plugin working again. 2 caveats:
It doesn’t place 3d models properly (othos and DEMs are perfect). I’ve used my own datasets as well as samples from ODM github to no avail; 3d models always end up within 500m of where they should be just not exact. Adjust Location feature in Cesium after the upload is tedious but not difficult. I’m willing to try other datasets if someone has one that was known to work before the plugin broke.
If you use Cloud Import for a project, the Cesium plugin buttons do not appear at all. Other projects without Cloud Import still function properly.
Is it better to do a pull request now to share the code changes or get these bugs worked out first?
Awesome work getting the plugin mostly-working again!
I’m not the authoritative answer on this, but I don’t personally see the harm of setting up a draft PR now, so Piero and Stephen can see what you’ve got going, and maybe offer some feedback.
I’ve got a neat idea to extend it a little further. Cesium lets you store original data on S3 to optimize quota use (blog post). We could definitely get the plugin to first upload to S3 and then link to Cesium for processing and tile storage.
Do I need anyone’s permission to implement that or just full steam ahead?
Could be an interesting addition! I wouldn’t remove the option to upload directly to Cesium though (if that was the intent?), not everyone wants to use S3.