Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Unable to restrict allowlist because of missing features in Rust #1023

@crapStone

Description

@crapStone

Describe the bug
I want to use the Bridge-Pattern with a few more options enabled.

I enabled all options i wanted by reading the documentation:

"allowlist": {
    "all": false,
    "event": true,
    "open": true,
    "openDialog": true
}

When i tried to use the http module from tauri this error was printed:

[ERROR] "httpRequest' not on the allowlist (https://tauri.studio/docs/api/config#tauri.allowlist)"

This option isn't in the docs but tried anyway and now cargo printed the following error:

error: failed to select a version for `tauri`.
    ... required by package `<application_name> v0.1.0 (<application_path>/src-tauri)`
versions that meet the requirements `=0.9.2` are: 0.9.2

the package `<application_name>` depends on `tauri`, with features: `http-request` but `tauri` does not have these features.


failed to select a version for `tauri` which could resolve this conflict

To Reproduce
Steps to reproduce the behavior:

  1. Go to src-tauri/tauri.conf.json
  2. Add "httpRequest": true, to tauri:allowlist
  3. Use for example:
import http from 'tauri/api/http'
http.get('https://google.com')
  1. Start tauri application
  2. Look at the output of tauri dev

Expected behavior
When I add the httpRequest option to the allow list I want the application to compile and the ability to use the http module from JavaScript.

Platform and Versions:
OS: Linux(5.8.10-arch1-1) - linux/x64
Node: 14.11.0
NPM: 6.14.7
Yarn: 1.22.5
Rustc: 1.46.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions