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

[Bug?]: Command.create('exec-curl') randomly stopped working in beta version #1327

Closed
caseybaggz opened this issue May 15, 2024 · 0 comments · Fixed by #1328
Closed

[Bug?]: Command.create('exec-curl') randomly stopped working in beta version #1327

caseybaggz opened this issue May 15, 2024 · 0 comments · Fixed by #1328
Labels
bug Something isn't working plugin: shell

Comments

@caseybaggz
Copy link

Original Thread in Discord Support Channel

Problem

In Tauri beta app, I've been using a curl command via the Command.create shell plugin which was working fine until Tuesday afternoon when it randomly stopped.

The return value suddenly started becoming this with a 200 response:

{"String":"  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current\n                                 Dload  Upload   Total   Spent    Left  Speed\n\r  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0\r  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0\r100  226k    0  226k    0     0   322k      0 --:--:-- --:--:-- --:--:--  322k\n","code":0,"signal":null}

Context

Here is the setup I have. Unfortunately, I cannot provide a duplication due to copyrights around the private code base.

default.json permission:

{
 "permissions": [
   {
      "identifier": "shell:allow-execute",
      "allow": [
        {
          "name": "exec-curl",
          "cmd": "curl",
          "args": [
            {
              "validator": "\\S+"
            }
          ],
          "sidecar": false
        }
      ]
    }
 ]
}

JS:

const result: string = await Command.create('exec-curl', 'https://some.website');
const { data } = JSON.parse(result);

Meta

  • Tauri API: 1.0.0-beta.11
  • Tauri CLI: 2.0.0-beta.17
  • Plugin Shell: 2.0.0-beta.4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working plugin: shell
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants