I'm using the Google Analytics library in my iPhone/iPad app; one part of the code sometimes throws an error, the [error localizedDescription] shows the following:
The operation couldn’t be completed. (com.google.googleanalytics.GANTrackerError error 195946409.
I didn't find any information about this error code; the app doesn't crash there, but I'm assuming that the tracking also doesn't work in that case. Does someone know the reason?
Thanks a lot!
Edit: the code in question:
[[GANTracker sharedTracker] setCustomVariableAtIndex:0
name:#"article"
value:[model name]
withError:&error];
got it: customVariableAtIndex must not be 0; it seems like it has to start at 1...
It appears this error 195946409 can appear for a number of reasons, not limited to just setting an incorrect index. For example, If your value is too long, you will get the same error.
Related
I am getting this error from Sentry repetitively in ios - safari 14.0 in react project.
There is no code trace and no other information than this but it repeats in almost every URL.
I have already searched for the options everywhere. I have tried debugging but I can't replicate it, and so I can't resolve it.
Does anyone know what does this error means? Or how can I add debug information in Sentry?
I have been looking for the solution for a while and couldn't get it. I know it's a bit lack of information to provide but that's why I am asking this. if someone can tell me how to deal with sentry errors if you don't know why it is repeating so often, it will be really helpful.
A similar issue still exists.
Faced this in Safari when Draft.js is updating the editor state.
The error which I see: IndexSizeError: The index is not in the allowed range.
For me, playing around with Paragraph Directioncontext menus items after right-clicking on the Editor selection reproduced the error.
My Solution/hack:
Add it to any JS file executing before the Editor file.
const nativeSelectionExtend = Selection.prototype.extend;
Selection.prototype.extend = function (...args) {
try {
return nativeSelectionExtend.apply(this, args);
} catch (error) {
console.log('Selection error.', error);
}
};
It works properly for me. Maybe will be useful for somebody as well.
Thanks to https://github.com/shpakkdv
I have a big issue in my app, which prevents creating new documents and reading them, whereas it worked well until now.
I didn't change anything, and it started bugging from a build to another.
This is the code I'm using:
CLProject *project = [[CLProject alloc] initWithFileURL:projectURL];
NSLog (#"Will save project at URL: %#", projectURL);
[project saveToURL:projectURL forSaveOperation:UIDocumentSaveForCreating completionHandler:^(BOOL success) {
NSLog (#"Project saved: %d", success);
[...]
}];
CLProject is a subclass of UIManagedDocument.
The first NSLog is called, but not the second one. Instead I get an error :
2018-02-14 19:21:03.597495+0100 CamList[2247:750786] Will save project
at URL:
file:///var/mobile/Containers/Data/Application/151E38F5-2214-4876-A188-2AB8B5E8CF6A/Documents/Projects/715A0087-F2EF-439B-A2DD-8E878EF8A973.camlist
2018-02-14 19:21:03.783397+0100 CamList[2247:750886] [default] [ERROR]
Could not get attribute values for item
/var/mobile/Containers/Data/Application/151E38F5-2214-4876-A188-2AB8B5E8CF6A/Documents/Projects/715A0087-F2EF-439B-A2DD-8E878EF8A973.camlist
(n). Error: Error Domain=NSFileProviderInternalErrorDomain Code=1 "The
reader is not permitted to access the URL."
UserInfo={NSLocalizedDescription=The reader is not permitted to access
the URL.}
But it doesn't crash, the app keeps running (but nothing happens because the completion block never gets called).
What I don't understand is that everything was working fine and I haven't changed anything...
Can you help me??
Thanks
Well, it seems to work fine again this morning... Nothing to understand. My iPhone had to be tired...
I am trying to implement this LinkedIn library in my project, but it seems that I get an error while I try to present the LinkedIn screen:
Authorization failed LinkedIn1: Error Domain=LIALinkedInERROR Code=1
"The operation couldn’t be completed. (LIALinkedInERROR error 1.)"
You can find the code that I am using here.
I also faced the same problem .My error was Error Domain=LIALinkedInERROR Code=2. On 26th May , 2016 the Linkedin has again made some changes due to which extra '#!' are added to the state and as a result ,the state do not match in LIALinkedInAuthorizationViewController class. So the solution is to remove those 2 characters either by replacing string or by checking contain string.
In the else part of this method - (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType {
change to `
NSString *receivedState = [[self extractGetParameter:#"state" fromURLString: url] stringByReplacingOccurrencesOfString:#"#!" withString:#""];
` or apply contains string so that the state is matched completely.
I know its kind of a weird solution but that did the trick for me. Hope it helps you as well.
All the best
May this information help you -
API Terms of Use
Transition Guide
Since the 12th May Linkedin's API has changed. From now on any apps requesting r_contactinfo must be approved by LinkedIn. This link explains the changes.
I'm using this Library and just had to change the permissions from #"r_contactinfo" to #"r_basicprofile", #"r_emailaddress".
Also remember to change your app permissions on developer.linkedin.com to match the above.
You should have to use:
code=https://www.linkedin.com/oauth/v2/authorization?
In place of:
code=https://www.linkedin.com//uas/oauth2/authorization?
Also in linkedin api:
LIALinkedInAuthorizationViewController.m
LIALinkedInHttpClient
Change:
NSString *accessTokenUrl = #"/uas/oauth2/accessToken?grant_type=authorization_code&code=%#&redirect_uri=%#&client_id=%#&client_secret=%#";
By:
NSString *accessTokenUrl = #"/oauth/v2/accessToken?grant_type=authorization_code&code=%#&redirect_uri=%#&client_id=%#&client_secret=%#";
Jack's answer is absolutely true, Jack's Answer. In addition to this you can use this library also LinkedinIOSHelper , it is easy to use
I am sharing photo usingFBDI presentShareDialogWithPhotoParams /presentShareDialogWithPhotos method in FBDialogs. This method shares photo successfully on my wall but always returns an error, meaning that it posts photos with an NSError.
Error is like....
Error Domain=com.facebook.Facebook.platform Code=103 "The operation couldn’t be completed.
(com.facebook.Facebook.platform error 103.)"
UserInfo=0x16d874f0 {error_code=103, error_description=An unknown error occurred., app_id=593434950703264, error_reason=( { result = 1; } )}
Why this happen?
I believe this answer will get deleted like my previous one, but anywho...
The issue have been fixed!!!,
just update your Facebook app to v20,
released on December 8th.
See:
Code=103 "The operation couldn’t be completed ..." in Share Photo
note:
I want to add comment to the question but I don't have the privilege to do that,
so I add an answer instead.
Yesterday, I came across the same issue, the strange thing was that is even after this error comes, just check your Facebook (for which you've shared a content), and yes you'll feel awesome, the content is already uploaded (shared) on Facebook. I'm also looking forward for this issue, in my checks this problem will only occurring if you're using this method + (FBAppCall *)presentShareDialogWithPhotoParams:(FBPhotoParams *)params clientState:(NSDictionary *)clientState handler:(FBDialogAppCallCompletionHandler)handler; from FBDialogs.h means, using of Facebook application dialog for sharing.
I'm still struggling with MKStoreKit.
There is a button called "buyAction" who has to launch the in-app purchase process. I've tried to implement it following tutorial advice but it still doesn't work :
- (IBAction)buyAction:(id)sender {
NSLog(#"buyFeature")
[[MKStoreManager sharedManager] buyFeature:#"PBonnet.TOEIC3.Package1"
onComplete:^(NSString* purchasedFeature, NSData*purchasedReceipt, NSArray* availableDownloads)
{ package1bought=1;
NSLog(#"success");
}
onCancelled:^
{ NSLog(#"failed purchase");
}];
}
On the onCompleteline, I've got 2 error messages : "Parameter name omitted" and "Expected expression".
Thanks for your help.
Cheers
EDIT of the onComplete line as supposed by matt. Now, the log is showing "buyFeature" but nothing after. App Store doesn't launch. Log shows this error message :
NSUbiquitousKeyValueStore error: PBonnet.TOEIC3 has no valid com.apple.developer.ubiquity-kvstore-identifier entitlement.
Look at the header for MKStoreManager. Here is the declaration for buyFeature:onComplete:onCancelled:
- (void) buyFeature:(NSString*) featureId
onComplete:(void (^)(NSString* purchasedFeature, NSData*purchasedReceipt, NSArray* availableDownloads)) completionBlock
onCancelled:(void (^)(void)) cancelBlock;
So, just to start with, we see that onComplete: requires a block that takes three parameters. But you are supplying a block with no parameters. Thus, the compiler rightly complains that you forgot the block parameters.
In effect, the problem has nothing whatever to do with MKStoreKit. The problem is that you don't know C - in particular, you don't know the syntax for blocks. I would suggest reading Apple's explanation of this topic.