Comments (10)
This is a small bug in how the search data population works, and we aren't taking any changes in that space right now.
from livesdk.
Hi, Thanks for your response. This might be "small bug" for you but big for me and my app. I am unable to understand how can a issue with API that returns wrong unique id for an object can be a treated as small bug and closed. Though I understand that the problem might be at the api endpoint and not this live sdk. Can you please open up this issue or post an workaround other than sending another query with the primary object's id to get it's parent id?
from livesdk.
Gotcha. I have figured out what is wrong in our internal systems, and I've got a fix that will be out when our next major release gets to market. The problem is that we are exposing an internal data value that represents your root OneDrive folder, but our permission model with the LiveSDK does not let you query that value directly.
As to a workaround. There is a way to do this, but this is a terrible terrible hack that should be marked as such in your code and it should be expected that in time this will break. With that disclaimer, you can perform a little dissection on the resource ids to know if you are using the broken placeholder.
Consider the following ID:
file.8ae9dbc6c4a4c.8AE9DBC6C4A4C!39598
Example | Section | Representation |
---|---|---|
file | 1 | If the item is a file or a folder |
.8ae9dbc6c4a4c | 2 | The group owner for the item |
.8AE9DBC6C4A4C | 3 | The account owner for the item (For your files the same as the group owner) |
!39598 | 4 | An internal reference number for items |
You could look at this internal reference number and determine if it is one of the numbers that is generated a bad response, around 105 or lower. These internal values are based on the internal data structures that are created for user accounts with the OneDrive service. For some older accounts this number could be very high for other accounts this number could be lower.
I would recommend that to work around this problem by adding the following to two options your program
- If you detect a value of 110 or less on the resource id of an items parent, request the just that item information a second time so you get a valid parent's information.
- Before you perform a search, query the root of the users OneDrive account and use that as a reference list to see if the search item's parent is the OneDrive root which you would use in place of the bugged 'id'.
from livesdk.
Thank you so much for looking into this issue. I would assume I get a notification via github when this fix is released. As for the workaround, I am currently already querying the parent id with each search result. But that is not appearing an acceptable UX due to additional lags being imposed when the search results are high in number.
Regarding your second point, can you please advise if the issue exists only for the immediate children of the root folder? If that is the case, I can cache the root children and that would solve my purpose. I won't implement this caching if the issue is widespread (deep down the root folder). Please let me know.
from livesdk.
This will happen on items that are at the root of a users OneDrive or a the root of a Group folder, if your app doesn't interact with group folders then you can just keep your root cache fresh and you should be able to avoid this issue.
We'll keep this issue around, and it will be closed when the service patch is live.
from livesdk.
@scpc0609 This change should be live now, could you give it a try and confirm that this is fixed? Actually this was a mistake, this change is not live yet, but its coming shortly!
from livesdk.
Thanks for the update
from livesdk.
Everything should be out now, please let me know if this issue is resolved.
from livesdk.
Hi, Thanks for the update. It appears this issues is fixed and can be closed now.
But intermittently I have seen that search takes a long time with empty pages being returned. This is not something that I have seen in the last few days.Not sure something around this has been fixed as well.
from livesdk.
Glad to hear that scenario is fixed. If you could capture a fiddler trace or something similar of those bad requests I can take a quick look, just open a new issue.
from livesdk.
Related Issues (13)
- Wrong license. HOT 2
- XMPP login gives not-authorized HOT 6
- JsonWebToken sample is not working correctly HOT 3
- Mac OS X support HOT 6
- Javascript API Doesn't Like Ports other than 80 HOT 1
- Unable to register a Metro-style app HOT 3
- com.microsoft.live.LiveAuthException HOT 2
- Namespace issue(s) with ASP.NET Oauth sample code HOT 1
- No pop up method / get email (PHP) HOT 1
- Time out exception HOT 1
- Sample->PHP->Oauth Invalid redirect_uri HOT 1
- Doesn't work w/ 8.1 with c# and xaml HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from livesdk.