Sunday, 11 October 2020

Trying to build the open source Signal iOS app and connect to my own server

I'm trying to build the Signal iOS app to connect to my own Signal server.

I have already successfully built the Signal Android app to connect to my own server.

For both I followed the article, https://github.com/madeindra/setup-guide/tree/master/signal-ios

Using Signal iOS build 3.13.2.6 XCode 12

I was able to get the app to build in XCode after some effort. The app ran, got through the verify phone number screen (so I assume was able to hit our server successfully and I got the SMS message through Twilio) Next was the User info screen asking for name, this crashed with this error,

**Fatal error: [OWSUploadV2.swift:78 upload(data:uploadForm:uploadUrlPath:progressBlock:)]: Error: Error Domain=NSURLErrorDomain Code=-999 "cancelled" UserInfo={NSErrorFailingURLStringKey=https://xxx.cloudfront.net/, NSErrorFailingURLKey=https://xxx.cloudfront.net/, _NSURLErrorRelatedURLSessionTaskErrorKey=(**
**"LocalUploadTask <2455BE4E-077E-4FD5-B8FA-7F03FD733F70>.<1>"**
**), _NSURLErrorFailingURLSessionTaskErrorKey=LocalUploadTask <2455BE4E-077E-4FD5-B8FA-7F03FD733F70>.<1>, NSLocalizedDescription=cancelled}: file SignalCoreKit/OWSSwiftUtils.swift, line 35**

This seemed to be some kind of SSL issue, although opening the cloudfront URL in a browser or in the Android app did not have any issues.

I added the code to OWSUploadV2.swift,

class func upload(data: Data,... {
        var uploadSessionManager = self.uploadSessionManager
        let securityPolicy = AFSecurityPolicy(pinningMode: AFSSLPinningMode.none)
            securityPolicy.validatesDomainName = false
            securityPolicy.allowInvalidCertificates = true
        uploadSessionManager.securityPolicy = securityPolicy

and this seemed to solve the issue, but not sure why the issue occurred...

so this gets me to the next screen for entering a PIN, but this crashed with the error,

**2020-10-08 14:22:10:284 Signal[4202:2191958]** 💛 **[OWSWebSocket.m:605 -[OWSWebSocket processWebSocketResponseMessageAsync:]]: received WebSocket response requestId: 7765599138296075969, status: 200**
**2020-10-08 14:22:10:287 Signal[4202:2191848]** ❤️ **[VersionedProfilesImpl.swift:234 didFetchProfile(profile:profileRequest:)]: Invalid credential: VerificationFailed.**
**Fatal error: [VersionedProfilesImpl.swift:234 didFetchProfile(profile:profileRequest:)]: Invalid credential: VerificationFailed.: file SignalCoreKit/OWSSwiftUtils.swift, line 35**

This is where I am stuck. Anyone have any ideas? Has anyone else successfully got Signal iOS connecting to their own server?



from Trying to build the open source Signal iOS app and connect to my own server

No comments:

Post a Comment