-
Notifications
You must be signed in to change notification settings - Fork 58
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
Running from API throws error that action could not be found #305
Comments
Hey @nickconway , very odd that this is working intermittently. What API method are you using, /StartAction? |
Yup, I'm using StartAction. I've got it working now after running the command from the web UI before making the request. Maybe the action id isn't being set correctly on startup? |
@nickconway , Ah, yep, you've found a bug! That was a good hint about refreshing the web interface seems to fix it. OliveTin internally now uses a "public action map" that allows for virtual actions, this was added several months ago when entities were first added. That "public action map" is actually only built when Thanks for reporting this, the fix is incredibly easy - just build that "public action map" when the API starts up, but I want to improve the unit tests in this area to make sure this doesn't come back again. Working on it right now, thanks again for reporting, will update you soon. In the meantime, a workaround is to refresh the web interface at least once if OliveTin restarts. |
I've run into this issue today, as pointed out by my wife when she said "I can't disable pihole, the button doesn't work." By button it's an iOS Shortcut/Action that does a POST to the API with /StartAction. And running the command from the Olivetin WebUI after starting the Docker container seems to get everything fixed and working again. Olivetin Docker Container version: Here's some logs:
Config:
|
What seems to be the problem?!
When attempting to run an action from the API, sometimes an error is thrown that no action could be found with a blank action title.
Can you provide a sosreport?
What package/file/container did you use to install OliveTin?
Docker container - jamesread/olivetin:latest
Your config.yaml
OliveTin logs
Screenshot of WebDeveloper console logs
N/A
Anything else?
Running the command from the APU
The command I'm running to send the request:
curl <REDACTED>/api/StartAction -X POST -d '{ "actionId": "updateContainers", "arguments": [{ "name": "hostname", "value": "<REDACTED>" }] }'
It seems to work intermittently. For example last night it was working as expected, but this morning the error occurred again.
The text was updated successfully, but these errors were encountered: