Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

Cannot read property 'location' of null

(0) ShareShare
ReportReport
Posted on by 9

Cannot read property 'location' of null

Session ID: 8ec98dfa-6c32-3b60-8aaf-9568eeabb52c

 

I created an App in my default environment. The data source is a sharepoint online list for which all my teammates have admin access to the teamsite. I embedded the App to the teamsite and shared the App as "Can Use" to my teammates but it prompts them to create connection to Sharepoint then finally has an error. The usage experience is very bad!

  • lukey1111 Profile Picture
    8 on at
    Re: Cannot read property 'location' of null

    Hello.

     

    I'm having the exact same issue with this. The powerapp works for me, but doesn't work for our end user. They have permissions to access the sharepoint site and were also logged into the sharepoint site prior to launching the power app. All connections (including to Office365 connected, but the sharepoint side errored with :-

     

    Cannot read property 'location' of null

     

    Session ID: b31ce39d-63e3-35bd-9da7-314a8a9a2481

     

    The sequence of events mirrored exactly what's been outlined above, which leads me to think that it's an error on the PowerApps side, rather than a set up issue on our side.

     

    I'd appreciate any assistance that you may be able to provide.

  • Mikki Profile Picture
    9 on at
    Re: Cannot read property 'location' of null

    Hi Mabel,

    Thanks for your reply. The error is not referring to a list column. It is for all shared users who get the error. Not related to specific device as even I embed it to a Sharepoint page, the same error is prompted.

    I wonder if the connection to a Sharepoint list is a custom connection for which your link mentioned that "When you share an app that uses a custom connector, it is automatically shared, but users must create their own connections to it.".

    I exported the App and imported to the company default environment then ask one user to explicitly go to powerapps web portal to create the Sharepoint connection then go to the page with the App again, this time there is prompt to click Allow for Sharepoint permission. And finally they can access the App! The point is they have access to both the App and the Sharepoint list originally and the App stupidly asked for permission to a list not owned by them and during the process, it failed and prompted an error! Really hope Microsoft would improve the sharing experience. I remember such issue was not there when I test on PowerApps last year. Below are the screen caps for the error.

     

    1. Prompt for Sharepoint Permission

    2. View Permissions

    3. Clicking sign in then prompt to create connection

    4. An error is encountered.

    5. Clicked on More for error details.

  • v-yamao-msft Profile Picture
    on at
    Re: Cannot read property 'location' of null

    Hi Mikki,

     

    Could you show me more details about the data source? What are the column types in the list?


    When you configure the app, have you used any functions to get the information about location?


    Do all the shared users get the same error message “Cannot read property 'location' of null”?


    On which device are they running the app?


    I am not able to reproduce this issue on my side. Please help provide more details about the issue.

     

    PS: When the first time shared users open the shared app on their side, they are asked to create a connection to data source using their own credentials. It won’t appear the second time they open the shared app on their side. This documentation could be your reference:
    https://powerapps.microsoft.com/en-us/tutorials/share-app-resources/

     

    Best regards,
    Mabel Mao

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,702 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,015 Most Valuable Professional

Leaderboard