sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

SPFX not working on SharePoint Mobile App

Open danielcostalvt opened this issue 1 year ago • 4 comments

Target SharePoint environment

SharePoint Online

What SharePoint development model, framework, SDK or API is this about?

💥 SharePoint Framework

Developer environment

None

What browser(s) / client(s) have you tested

  • [ ] 💥 Internet Explorer
  • [ ] 💥 Microsoft Edge
  • [ ] 💥 Google Chrome
  • [ ] 💥 FireFox
  • [ ] 💥 Safari
  • [X] mobile (iOS/iPadOS)
  • [X] mobile (Android)
  • [ ] not applicable
  • [ ] other (enter in the "Additional environment details" area below)

Additional environment details

  • browser version
  • SPFx version
  • Node.js version
  • etc

Describe the bug / error

We have a couple SPFX web parts that work just fine on mobile browsers (see images below) When we try to use the SharePoint Mobile App, both Android and iOS, they just wont load.

Is this a normal behavior? Are we missing some "setup" to make them work fine?

Steps to reproduce

Expected behavior

SharePoint Mobile App would show the custom spfx web parts correctly

danielcostalvt avatar Mar 07 '24 15:03 danielcostalvt

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

ghost avatar Mar 07 '24 15:03 ghost

I am experiencing the same problem, both on Android and iOS. Mobile browsers still work well.

SPFX SP App error 1

Ryan365Apps avatar Mar 07 '24 21:03 Ryan365Apps

I also have the same issue; SPFx solutions with 3rd party API integrations are not rendering in the Microsoft SharePoint App on iOS or Android. In Safari and Chrome browsers they render as expected. The issue is only when using the "Microsoft SharePoint App"

mczecho avatar Mar 08 '24 16:03 mczecho

After further testing I have narrowed the issue down to token acquisition when using the AadtokenProviderFactory to get a token to call our API, From my findings the getToken method stalls and never returns the token or throw an error that we could catch, I also tested just trying to get a token without calling our API and got the same result,

As a quick example: private async getToken(): Promise<string> { try { this.showMessage(Start getTokenProvider....); const tokenProvider = await this.context.aadTokenProviderFactory.getTokenProvider(); this.showMessage(Start getToken...); const token = await tokenProvider.getToken(AppSettings.clientId); this.showMessage(Token aquired...); console.log("Token: ", token); return token; } catch (error) { this.showError(Error in getToken: ${error}); } } The "Token aquired..." message is never hit and no error is displayed either so we have come to the conclusion that this is where the issue is.

This is the case for all our spfx solutions regardless of version as we have various solutions using different versions including the latest v1.18.2

JohnEnnisLvt avatar Mar 15 '24 16:03 JohnEnnisLvt

Still no answer and app still wont work on some tenants for SharePoint Mobile App.

When can we expect an answer?

danielcostalvt avatar Apr 01 '24 09:04 danielcostalvt

It seems to show the web parts now, tested in android and iOS

Ryan365Apps avatar Apr 29 '24 20:04 Ryan365Apps

Hello @danielcostalvt, Thank you for bringing this issue to our attention. Could you please confirm if the issue still persists for you?

Amey-MSFT avatar Jun 23 '25 04:06 Amey-MSFT

We are closing this issue for now. If the problem persists, feel free to reopen it or open a new one.

Amey-MSFT avatar Jul 07 '25 10:07 Amey-MSFT