matrix-org / matrix-org/matrix-ios-sdk

MX3PidAddManager submit msisdn token error?

Open
#956 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Objective-C
Stars
484
Forks
225
PR merge metrics
No merged PRs in 30d

Description

No any class holds `MXHTTPClient`, let it dealloc when returning, and the request cancelled without any callback.

```
- (MXHTTPOperation *)submitMsisdnTokenOtherUrl:(NSString *)url
token:(NSString*)token
medium:(NSString *)medium
clientSecret:(NSString *)clientSecret
sid:(NSString *)sid
success:(void (^)(void))success
failure:(void (^)(NSError *))failure
{
NSLog(@"[MX3PidAddManager] submitMsisdnTokenOtherUrl: %@", url);

NSDictionary *parameters = @{
@"sid": sid,
@"client_secret": clientSecret,
@"token": token
};

MXHTTPClient *httpClient = [[MXHTTPClient alloc] initWithBaseURL:nil andOnUnrecognizedCertificateBlock:nil];
return [httpClient requestWithMethod:@"POST"
path:url
parameters:parameters
success:^(NSDictionary *JSONResponse) {
success();
}
failure:failure];
}
```

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating MX3PidAddManager and its submitMsisdnTokenOtherUrl: method, then inspect how MXHTTPClient request operations are retained. Verify the request lifecycle and callbacks for this method; done means the POST request remains alive long enough to complete or report failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
objective-c
Domain
api
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.