# Error report: setPublicAccess from universalAccess not working as expected

**URL:** https://forum.solidproject.org/t/error-report-setpublicaccess-from-universalaccess-not-working-as-expected/5337
**Category:** General Discussion
**Created:** [June 8, 2022, 9:04pm UTC](https://forum.solidproject.org/t/error-report-setpublicaccess-from-universalaccess-not-working-as-expected/5337 "2022-06-08T21:04:44Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Greetings](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/greetings/32/3226_2.png) [@Greetings](https://forum.solidproject.org/u/Greetings)
#### Post date: [June 8, 2022, 9:04pm UTC](https://forum.solidproject.org/t/error-report-setpublicaccess-from-universalaccess-not-working-as-expected/5337/1 "2022-06-08T21:04:44Z")

</div>

Hello everyone, here is the deal, when I try to use setPublicAccess it doesn’t return null, but returns an access object that is unchanged.  
To clarify this: I provide the updates to public access, but those are not applied as if I don’t have permissions to change them, but in that case I should receive null as a return, but I get the unchanged access object.

> **Code**
>
> ![Screen Shot 2022-06-09 at 10.26.03 AM](https://europe1.discourse-cdn.com/flex017/uploads/solidproject/original/2X/2/21cc0cc51b5a4bd6111dab8a1100b20be19e7b4e.png)

> **Console output**
>
> ![Screen Shot 2022-06-08 at 10.58.39 PM](https://europe1.discourse-cdn.com/flex017/uploads/solidproject/original/2X/e/eb63a9a6e99ba652be8b110e5b3c5bad935da5b4.png)  
> ![Screen Shot 2022-06-08 at 10.59.05 PM](https://europe1.discourse-cdn.com/flex017/uploads/solidproject/original/2X/0/079df84d604a21f64fde948ef16306ed30762087.png)

---

<div class="post-metadata">

### Author: ![Vincent](https://avatars.discourse-cdn.com/v4/letter/v/e9bcb4/32.png) [@Vincent](https://forum.solidproject.org/u/Vincent)
#### Post date: [June 9, 2022, 10:59am UTC](https://forum.solidproject.org/t/error-report-setpublicaccess-from-universalaccess-not-working-as-expected/5337/2 "2022-06-09T10:59:32Z")

</div>

Unfortunately I don’t know much about how access on [pod.inrupt.com](http://pod.inrupt.com) works nowadays, but I imagine it would be easier for people who do to help you if you also share what network requests you see (e.g. in your browser’s [network monitor](https://firefox-source-docs.mozilla.org/devtools-user/network_monitor/index.html)).

---

<div class="post-metadata">

### Author: ![nicolasmondada](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/nicolasmondada/32/1905_2.png) [@nicolasmondada](https://forum.solidproject.org/u/nicolasmondada)
#### Post date: [June 10, 2022, 7:49am UTC](https://forum.solidproject.org/t/error-report-setpublicaccess-from-universalaccess-not-working-as-expected/5337/3 "2022-06-10T07:49:49Z")

</div>

Hi All,

Thanks for reporting this problem. We are logging this a as a bug and will keep you posted on the progress.

Thanks,  
Nick.-

---

<div class="post-metadata">

### Author: ![Greetings](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/greetings/32/3226_2.png) [@Greetings](https://forum.solidproject.org/u/Greetings)
#### Post date: [June 10, 2022, 1:05pm UTC](https://forum.solidproject.org/t/error-report-setpublicaccess-from-universalaccess-not-working-as-expected/5337/4 "2022-06-10T13:05:56Z")

</div>

Sure, thank you. Do you want me to report it via github?

---

<div class="post-metadata">

### Author: ![nicolasmondada](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/nicolasmondada/32/1905_2.png) [@nicolasmondada](https://forum.solidproject.org/u/nicolasmondada)
#### Post date: [June 10, 2022, 1:29pm UTC](https://forum.solidproject.org/t/error-report-setpublicaccess-from-universalaccess-not-working-as-expected/5337/5 "2022-06-10T13:29:14Z")

</div>

Sure, it doesn’t hurt if you do but feel free not to as well, we will look into this anyway 🙂

---

<div class="post-metadata">

### Author: ![Greetings](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/greetings/32/3226_2.png) [@Greetings](https://forum.solidproject.org/u/Greetings)
#### Post date: [June 13, 2022, 12:17pm UTC](https://forum.solidproject.org/t/error-report-setpublicaccess-from-universalaccess-not-working-as-expected/5337/6 "2022-06-13T12:17:44Z")

</div>

I have created a bug report on the github:

> <https://github.com/inrupt/solid-client-js/issues/1640>
>
> \<!--
> Thank you for reporting an issue.
> 
> Please fill in as much of the templat…e below as you're able. Feel free to delete any section you don't think applies, but be aware that the more comprehensive your description, the easier it is to take it into account.
> \--\>
> 
> 
> \### Bug description
> 
> SetPublicAccess doesn’t return null, but returns an access object that is unchanged.
> \### To Reproduce
> (the pod used to get this bug is hosted on https://pod.inrupt.com/)
> 1. Create a new container
> 2. try to use setPublicAccess to set a new public access type on the created container (e.g: {read:true, write: true} 
> 4. assign the return to some variable
> 5. check value of that variable, it would have read: false and write: false
> 
> \*\*Minimal reproduction\*\*
> 
> https://codesandbox.io/s/great-tharp-qzznwy?file=/src/index.ts
> 
> \### Expected result
> The expected result is: 
> 1) null returned in case if you don't have rights to change access to the resource.
> 2) an access object with values that were passed to the function (on return)
> \### Actual result
> 
> an access object with everything set to false was returned (while read: true and write: true were passed to the function)
> \### Environment
> 
> \<!--
> Please run
> 
> npx envinfo --system --npmPackages --binaries --npmGlobalPackages --browsers
> 
> in your project folder and paste the output here:
> \--\>
> 
> System:
> OS: macOS 10.15.7
> CPU: (4) x64 Intel(R) Core(TM) i5-3427U CPU @ 1.80GHz
> Memory: 47.77 MB / 4.00 GB
> Shell: 5.7.1 - /bin/zsh
> Binaries:
> Node: 16.14.0 - ~/.nvm/versions/node/v16.14.0/bin/node
> npm: 8.3.1 - ~/.nvm/versions/node/v16.14.0/bin/npm
> Browsers:
> Chrome: 102.0.5005.61
> Safari: 15.5
> npmPackages:
> @babel/core: ^7.17.9 =\> 7.17.9 
> @babel/preset-env: ^7.16.11 =\> 7.16.11 
> @babel/preset-react: ^7.16.7 =\> 7.16.7 
> @babel/preset-typescript: ^7.16.7 =\> 7.16.7 
> @inrupt/lit-generated-vocab-common: ^0.3.11 =\> 0.3.11 
> @inrupt/solid-client: ^1.23.1 =\> 1.23.1 
> @inrupt/solid-client-access-grants: ^1.0.1 =\> 1.0.1 
> @inrupt/solid-client-authn-browser: ^1.11.7 =\> 1.11.7 
> @inrupt/solid-ui-react: ^2.7.0 =\> 2.7.0 
> @inrupt/vocab-common-rdf: ^1.0.3 =\> 1.0.3 
> @types/jest: ^27.4.1 =\> 27.4.1 
> @types/node: ^17.0.23 =\> 17.0.23 
> @types/react: ^18.0.2 =\> 18.0.2 
> @types/react-dom: ^18.0.0 =\> 18.0.0 
> assert: ^2.0.0 =\> 2.0.0 
> babel-loader: ^8.2.4 =\> 8.2.4 
> bootstrap: ^5.1.3 =\> 5.1.3 
> buffer: ^6.0.3 =\> 6.0.3 
> css-loader: ^6.7.1 =\> 6.7.1 
> gh-pages: ^3.2.3 =\> 3.2.3 
> html-webpack-plugin: ^5.5.0 =\> 5.5.0 
> rdf-namespaces: ^1.9.2 =\> 1.9.2 
> react: ^18.0.0 =\> 18.0.0 
> react-bootstrap: ^2.2.3 =\> 2.2.3 
> react-dom: ^18.0.0 =\> 18.0.0 
> react-icons: ^4.3.1 =\> 4.3.1 
> solid-file-client: ^2.1.3 =\> 2.1.3 
> style-loader: ^3.3.1 =\> 3.3.1 
> ts-loader: ^9.2.8 =\> 9.2.8 
> typescript: ^4.6.3 =\> 4.6.3 
> webpack: ^5.72.0 =\> 5.72.0 
> webpack-cli: ^4.9.2 =\> 4.9.2 
> webpack-dev-server: ^4.8.1 =\> 4.8.1 
> npmGlobalPackages:
> corepack: 0.10.0
> create-react-app: 5.0.0
> java: 0.12.2
> jest: 27.5.1
> npm: 8.3.1
> typescript: 4.6.2
> 
> 
> \## Additional information

furthermore I have also added that the function getPublicAccess suffers from the same problem.  
On top of that in the reply message to the bug report that I have linked, after an investigation of the source code I described where the bug might be coming from.
