System.ArgumentOutOfRangeException error in Windows 8 Visual Studio? - facebook

I just downloaded a sample app for Windows 8 that should allow users to look through albums and upload pictures to facebook. When starting the app, I succeed in logging into my facebook, but right after logging in and displaying my profile picture, I get the following error:
"An exception of type 'System.ArgumentOutOfRangeException' occurred in mscorlib.dll but was not handled in user code
Additional information: Index was out of range. Must be non-negative and less than the size of the collection.
If there is a handler for this exception, the program may be safely continued."
The problem seems to occur at this line:
await GetUserProfilePicture();
The app is here: http://code.msdn.microsoft.com/Facebook-Photo-Albums-c9589b5a?SRC=VSIDE Would anybody be kind enough to download it and see what the problem is? You also need an App ID for it to function.

The error is on line 81, file FacebookInfoView.xaml.cs. When albuminfo list has no values i.e. count = 0 and if you call albuminfo[0], it's surely gonna throw System.ArgumentOutOfRangeException.

Related

error in flutter and my phone is not responding never

I using google map on my app, and upload the code to my phone,
the problem is sometimes when I enter and exit to the map quickly,
the phone is not responding never !!! also I can't turn the phone off!!!
the only solution is re-upload the code again, only this is the solution to make my phone work!!
I try to see the output from the android studio, and I see like that
[ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: PlatformException(error, Neither user 10737 nor current process has android.permission.WAKE_LOCK., null)
I wish you understand and help me!
The error clearly says that the app doesn't have the permission to unlock the phone by itself.
You should add the permission in your code and request it from the user.
If you search it on the net, you will find that Google maps in flutter sometimes needs the permission WAKE_LOCK.
You should add it to your manifest.

Saved query using filters DFP Ad Units (Top Level) but not compatible with DFP API

I'm using PHP code and DFP API version v201911.
I create report queries in the Ad Manager UI, and retrieve them with the ReportService.getSavedQueriesByStatement method, but i received the error:
Fatal error: Uncaught exception 'UnexpectedValueException' with message 'The saved query is not compatible with this API version.'
If i delete filter option: DFP Ad Units (Top Level) from the saved query (in the picture) and run file PHP, i received a good result.
Please let's me know what wrong?
Thanks for your support!
enter image description here
I had the same issue when i was trying to use a saved query with key-values filtering and then i ran into this
in other words, a lot of the options in the UI are not supported via saved queries but google are not clear about what is allowed.
I hope that saves you some time:)

Getting Error after integrating facebook sdk in windows phone 8

I Have integrated facebook sdk in my windows phone 8 app and used facebook controls after downloading from NuGet.
However when I navigate to that facebook page, I get a "TargetInvocationException" and goes to Application Unhandled method where the debugger breaks, and the app crashes.
This is the exception: "An unhandled exception of type 'System.Reflection.TargetInvocationException' occurred in System.Windows.ni.dll"
Do I need to do anything else after downloading refrences from NuGet?.
This exception is thrown by methods invoked through reflection, but without knowing more about you implementation it will be hard for anyone to help and advise.
Are you able to provide more information, in particular code snippets and details of the inner exception?

ref=ts on facebook app url cause app not found error

I've create an facebook app and it run smoothly at
https://apps.facebook.com/icoloringstar/
But the problem is: when I search my app name "icoloring star" in facebook, it link to the app at url:
https://apps.facebook.com/icoloringstar/?fb_source=search&ref=ts
Then facebook said that:
App "iColoring Star" is unavailable
The app "iColoring Star" is temporarily unavailable due to an issue with its third-party developer. We are investigating the situation and apologize for any inconvenience.
We found that url part "ref=ts" cause above problem, but really do not know why?
Could you explain me why and how to resolve this problem?
Thank you very much.
It sounds like your code is failing when the ref parameter is supplied in the request path.
I was able to repro this with any arbitrary value in the ref parameter when accessing your app
Check your server logs and and see if you're returning a 500 error to facebook when the request comes in
See if you have any code that parses a ref parameter and check it's not throwing exceptions
Make sure your callback URL in the app settings doesn't also specify a ref parameter or your app may receive two values and/or fail entirely
It means 'Top Search'. User enter a query into the top of search.
There are some ref parameters.. ref=bookmarks for example. I dont know the full list.
Did you put your app on Facebook App Center?

Request Dialog CRASHED?

Recently, Facebook has updated the component "request dialog" assigning responsibility to the exclusion of requests to the developers (http://developers.facebook.com/docs/reference/dialogs/requests#deleting). He also made other adjustments to the format of the request id. Thus added configuration option "request 2.0 efficient" on menu of the application developer.
The problem started after this change , the component "request dialog Multi - Friend- Selector" is in serious trouble. The component is crashed while trying to load friends. Sometimes friends loads, but the component does not resize height.
See the image of the errors:
Crashed before load friends:
http://postimage.org/image/glk2mf3bb/
Resize fail
http://postimage.org/image/iobduhn41/
In chrome browser component generates the following error:
s-static.ak.facebook.com/rsrc.php/v1/yS/r/syXGEAW5WYH.js:36 Uncaught TypeError: Cannot read property 'origin' of undefined
In firefox generates following error:
Erro: Permission denied to access property 'DocRPC'Arquivo-fonte: https://s-static.ak.facebook.com/rsrc.php/v1/yS/r/syXGEAW5WYH.js Linha: 36
Can you reproduce the error with the code itself Documentation
http://developers.facebook.com/docs/reference/dialogs/requests
Help please.
Seeing same errors here, but I can add some info:
It does seem to work if you use the basic example in https://developers.facebook.com/docs/reference/dialogs/requests, which opens up the dialog in a new browser window.
In Chrome, I found an additional error message to the one you posted:
"Unsafe JavaScript attempt to access frame with URL [...] from frame with URL [...]facebook.com/dialog/apprequests. Domains, protocols and ports must match."
From all that I guess the error may be related to the dialog display mode (read https://developers.facebook.com/docs/reference/dialogs). Within my app, I am getting this error exactly as you do, unless I set display to something like 'popup', in which case everything works (but a new borwser window is opened). The docs do state that "Because of the risk of clickjacking, [iframe] is only allowed for some certain dialogs, and requires you to pass a valid access_token." Well, passing access tokens did no good for me.
Little question: are you using some toolkit like GWT?