Issue with manifest v>5: domain permissions (fetch error)

Hi, we are developing a plugin that uses “fetch” to make calls to a REST API. After testing it with manifest v5, it’s not longer working (it was working correctly with version 4) .The console error message is the following:

“index.js:207 error calling FM DAPI: Plugin is not permitted to access the network apis. A valid domains entry is required in requiredPermissions.network field of the manifest.”

We have included the domain in “requiredPerminsions”, but still get the same error. This is what we have included in the manifest json:

  "requiredPermissions": {
        "network": { 
          "domains": ["https://our.domain.com"]
        }}

Have also tested with:

  "requiredPermissions": {
        "network": { 
          "domains": "all"
        }}

And:

  "requiredPermissions": {
        "network": { 
          "domains": ["all"]
        }}

No luck so far though.

The only documentation we’ve found about manifest v5 is in the below links:


https://www.davidebarranca.com/development/adobe-uxp-things-you-need-to-know-manifest-5

https://medium.com/adobetech/big-updates-coming-to-uxp-3185f0e47130

https://github.com/AdobeDocs/uxp-photoshop/pull/290/files

Any tips about this issue? are there any other sources of information we can check regarding manifest versions after 5?

Any insights would be greatelly appreciated, thanks!

Your first two examples look correct. That you’re still getting the error indicates (to me) that the manifest you’re editing is not the manifest that the plugin is using at runtime.

  1. How are you loading your plugin?
    • If you made changes after loading in UDT, make sure to ••• > Load the plugin again (reloading is insufficient to load changes to the manifest).
  2. Are you using React / Webpack?
    • If so, make sure your manifest change is being applied to your build folder (usually dist).

(Your third example won’t work at all, so don’t bother with that. That’s just specifying that you can only access a url with name all)

CC @pkrishna , @Sujai

Thank you for your reply Kerri. I fixed it! I was doing a silly mistake … I had the “requiredPermissions” property as part of the host. I took it outside the array and now it works perfectly :sweat_smile:

This was the wrong json:

 "manifestVersion": 5,
  "host": [
    {
      "app": "PS",
      "minVersion": "23.3",
      "requiredPermissions": {
        "network": { 
          "domains": "all"
        }}
    }
  ]

This is the correct version:

"manifestVersion": 5,
  "host": [{
    "app":"PS", 
    "minVersion":"23.3"
  }],
  "requiredPermissions": {
    "network": {
      "domains": "all"
    }
  }

:astonished: Are there any docs on this version? Or a blog post?

Good point! it should be 5 (I just changed it). I think I got a bit crazy trying options to fix the error and at some point got confused with the UDT version (I have 6.0.2).

Don’t frighten me, I am still working through the manifest 5 docs :rofl: