Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

file-picking/javascript-basic-consumer broken #66

Open
jgullstr opened this issue Feb 9, 2024 · 20 comments
Open

file-picking/javascript-basic-consumer broken #66

jgullstr opened this issue Feb 9, 2024 · 20 comments

Comments

@jgullstr
Copy link

jgullstr commented Feb 9, 2024

Describe the bug
File picking for personal accounts seem broken. Following instructions result in the picker showing a bicycle with a flat tire instead of my OneDrive files. This is neither what I want nor what I expect.

To Reproduce
Steps to reproduce the behavior:

  1. Follow the guidance in the root readme for setting up the AAD application
  2. Follow the guidance in the javascript-basic-consumer readme for setting up the FilePicker application

Expected behavior
I expect the "Launch Picker" button to bring the OneDrive experience directly into the application to provide a consistent, familiar, user-friendly experience to ensure my users can find the files they need and stay productive—no matter what they’re working on.

Screenshots
image

image

Details
The dev console spits out some clues that may or may not be related to this issue.

Error: Resource #285 "provider.instrumentation" is being consumed, but is not available in the current scope.

  1. Check to ensure that the dependency on this resource (and each step up the chain) is properly declared.
  2. If availability is expected, check to see if the target resource has a dependency that is only available in a child scope. Consumed directly.
@osolmaz
Copy link

osolmaz commented Feb 9, 2024

Also affected by this.

Can also reproduce with a confidential client.

Adding the cid query parameter mentioned in below pages doesn't seem to fix the issue.

https://stackoverflow.com/questions/77457558/problem-connecting-to-onedrive-file-picker-v8
#61 (comment)

I am out of ideas here. Maybe there is something wrong in the query parameters?

const params = {
    sdk: "8.0",
    entry: {
        oneDrive: {
            files: {},
        }
    },
    authentication: {},
    messaging: {
        origin: "http://localhost:3000",
        channelId: "27"
    },
    typesAndSources: {
        mode: "files",
        pivots: {
            oneDrive: true,
            recent: true,
        },
    },
};

@jgullstr
Copy link
Author

We had a working integration up and running that suddenly broke down with this error, so I assume something has changed in the FilePicker itself. I found the same issue on learn.microsoft.com here.

@saadumerhashmi
Copy link

saadumerhashmi commented Feb 15, 2024

I am facing the same issue. I had working integration up and running that suddenly broke down with this error. Adding CID doesn't seems to work.
cap

@codenamegary
Copy link

Seems the same as this issue.

#61

Not clear to me if this is really even supported at this point.

@jgullstr
Copy link
Author

jgullstr commented Mar 6, 2024

I have had an open ticket with Microsoft support since feb 14. After a few back and forths, the case got escalated "to discuss the issue with our concerned team". I did not hear back from them within a week, and asking for an approximate time window I got informed that there is a delay due to backlog of cases. Today, finally, I got a response, translated below, and the case was promptly closed. I hope this will help someone.

Microsoft's own summary of the issue:

Integration for OneDrive FilePicker v8 on personal accounts has broken down. I don't know who to contact. I need to know if something has changed, because an existing, working integration of ours have suddenly stopped working. The issue can be reproduced by following your own instructions in the sample repository: #66

Microsoft support response:

Hi Josef,

The OneDrive file picker allows you to connect your custom web apps to content stored in OneDrive (both commercial and enterprise) and SharePoint. The file picker provides a consistent and familiar user interface for your web app users to open, save, and share files stored in OneDrive or SharePoint. This file picker is exclusive to business applications.

Ref:

  1. File Picker SDK for JavaScript - OneDrive - OneDrive dev center | Microsoft Learn
  2. OneDrive File Picker v8 now generally available! - Microsoft 365 Developer Blog (Feel free to look at a short gif in this article to understand how the file picker works.

If you need help with the file picker, contact commercial support. They can help you with your problem.

See: https://learn.microsoft.com/microsoft-365/admin/support-contact-info?view=o365-worldwide

Your feedback is important to us. After this interaction, you will receive a separate closing email with the opportunity to tell us about your experience.
​>

Thanks
Nav M.
OneDrive support.
Shift time: 10:00 a.m. – 7:00 p.m. (PST)

Note that the link 1 is to FilePicker v7, and that the short gif that I am to watch "in order to understand how the file picker works", is showing the sample that currently is broken.

@damacisaac
Copy link

damacisaac commented Mar 6, 2024

Getting the same issue while following the instructions in the samples and documentation. Trying for the most basic implementation here and failing.

We have a working implementation of the v7.2 picker, but we can't use it because our picker needs to be embedded in an iframe rather than opening a new tab. In Excel Desktop, opening a new browser tab doesn't work as the webview that addins run in isn't able to communicate with another browser.

@codenamegary
Copy link

@jgullstr - Thanks for sharing that conversation. Quite disheartening, but glad to know I'm not suffering alone. I wonder how many hours people are wasting trying to make this work based on the broken examples and misinformation? Kind of a shame.

@damacisaac
Copy link

@patrick-rodgers it would be very appreciated if you and the team could have someone take a look at this ticket.

@uyanga-gb
Copy link

We have the same problem in OneDrive for consumer account type. It was working before but suddenly stopped working sometime in early February 2024. I tried adding cid, but that didn't help. Can someone take a look at this issue @patrick-rodgers?

@adri1wald
Copy link

It's because the initial URL has a bad query param:

https://api.onedrive.com/v1.0/drives/REDACTED/items/root/children?%24top=30&orderby=folder%2CsavedSortFieldValue&%24expand=thumbnails%2Clenses%2Ctags&select=*%2Cocr%2CwebDavUrl%2CsharepointIds%2CisRestricted%2CcommentSettings%2CspecialFolder%2CcontainingDrivePolicyScenarioViewpoint

savedSortFieldValue is not valid. if you replace it with name, fileSystemInfo%2FlastModifiedDateTime, or size the request works (or just change the sort order in the UI). can someone at microsoft please fix this?

@SenorFusion
Copy link

SenorFusion commented Mar 20, 2024

Maybe @JCrew0 can help, he seemed to know what happened on #61 which is the same issue.

The fix is known, thanks to @adri1wald comment above mine.

Be sure to see @jgullstr comment above where we have tried to escalate this through support and they say it is fine and close the issue.

This is a complete breaking change for anyone that uses File Picker v8 in a webapp

@JCrew0
Copy link
Collaborator

JCrew0 commented Mar 20, 2024

Thanks @adri1wald for figuring this out. @SenorFusion I can take a look at why that query param is breaking things

@adri1wald
Copy link

looks like this is fixed now -- thanks @JCrew0 and team!

@damacisaac
Copy link

Really appreciate it @JCrew0 and team. Well done!

@alvinalaphat
Copy link

alvinalaphat commented Apr 3, 2024

const params = {
sdk: "8.0",
entry: {
oneDrive: {
files: {},
}
},
authentication: {},
messaging: {
origin: "http://localhost:3000",
channelId: "27"
},
typesAndSources: {
mode: "files",
pivots: {
oneDrive: true,
recent: true,
},
},
};

Ok I have solved it people. All you have to do is remove this part from the params:

  typesAndSources: {
      mode: "files",
      pivots: {
          oneDrive: true,
          recent: true,
      },
  },

@damacisaac
Copy link

damacisaac commented Apr 8, 2024

I take it back - I'm still getting the same error. Error: Resource #287 "provider.instrumentation" is being consumed, but is not available in the current scope.. Seems like this prevents the picker from being able to authenticate properly.

@pieterclaerhout
Copy link

Any update on this? As far as I can see, this problem still exists…

@Acrylios
Copy link

Are there any further updates? I tried opening a separate issue as I'm having a similar problem to this thread but haven't gotten any replies yet

@damacisaac
Copy link

@JCrew0 would be great to have this looked at again - thanks!

@emelabnext
Copy link

+1, like @damacisaac and @Acrylios said, would be very much appreciated if this get's resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests