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

fix: respond with error when app is not connected #218

Closed
wants to merge 1 commit into from
Closed

Conversation

de-sh
Copy link
Member

@de-sh de-sh commented Apr 29, 2023

Closes #

Changes

Why?

Trials Performed

  1. Start uplink with following config:
action_redirections = { "send_file" = "load_file" }

[tcpapps.1]
port = 5555
actions = [{ name = "load_file" }]

[downloader]
actions = [{ name = "send_file" }]
path = "/var/tmp/ota-file"
  1. Trigger a send_file action on uplink with no app connected to handle load_file
 2023-04-29T13:29:03.808485Z  INFO uplink::collector::downloader: Firmware downloaded successfully

  2023-04-29T13:29:03.808528Z DEBUG uplink::base::serializer: publishing on /tenants/demo/devices/615/action/status with size = 108

  2023-04-29T13:29:03.808758Z  INFO uplink::base::bridge: Action response = ActionResponse { action_id: "388", device_id: None, sequence: 8, timestamp: 1682774943808, state: "Downloaded", progress: 100, errors: [], done_response: Some(Action { device_id: None, action_id: "388", kind: "process", name: "send_file", payload: "{\"url\":\"https://firmware.stage.bytebeam.io/api/v1/file/4cb248bb-26ba-44cb-9df4-d78a22386371/artifact\",\"content_length\":72299,\"file_name\":\"Screenshot from 2023-04-27 10-28-07.png\",\"download_path\":\"/var/tmp/ota-file/send_file/Screenshot from 2023-04-27 10-28-07.png\"}" }) }

  2023-04-29T13:29:03.808840Z DEBUG uplink::base::serializer: publishing on /tenants/demo/devices/615/action/status with size = 108

  2023-04-29T13:29:03.808883Z ERROR uplink::collector::tcpjson: Error = No receiver connected, app name: 1; port: 1

  2023-04-29T13:29:03.808944Z  INFO uplink::base::bridge: Action response = ActionResponse { action_id: "388", device_id: None, sequence: 0, timestamp: 1682774943808, state: "Failed", progress: 100, errors: ["No receiver connected, app name: 1; port: 1"], done_response: None }

@de-sh de-sh requested review from tekjar and amokfa April 29, 2023 14:00
@de-sh de-sh closed this May 22, 2023
@de-sh de-sh deleted the fix-norecv branch September 6, 2023 05:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant