Bluemix iOS bluelist quick start

When building the bms-samples-ios-bluelist which has the quickstart BlueList app, no matter whether I choose FaceBook or Google Authentication, the apps hangs with a Facebook Login or a Google Login prompt.

I get no error messages.

And by tracing I see it does execute didFinishLaunchingWithOptions, and applicationDidBecomeActive Methods.

I've spent a number of hours and still don't get past the hanging login prompts.

Would anyone have any clues?

From the Xcode console there are just some NSLogs i.e.

2015-11-03 09:29:22.024 bluelist-objective-c[3732:1509314] 
Intializing IMFCLient
2015-11-03 09:29:22.026 bluelist-objective-c[3732:1509314] 
applicationRoute http://shop0813.bluecend.com/
2015-11-03 09:29:22.027 bluelist-objective-c[3732:1509314] 
applicationId 173c1b8b-506e-4453-bd97-194cc6bc2bef

And, I trace the code but it never crashes on anything.

But, after

cf logs shop0813

I find:

2015-11-03T09:28:41.54-0600 [RTR/1]      OUT shop0813.bluecend.com - 
[03/11/2015:15:28:41 +0000] "PUT http://bluelist/enroll HTTP/1.1" 404 0 34 "-" 
"BlueListIDAgent/1 CFNetwork/758.1.6 Darwin/15.0.0" 
108.168.250.153:54267 x_forwarded_for:"67.198.78.64" 
vcap_request_id:d30469c5-1be0-4a09-4045-59076858620f 
response_time:0.007576638 app_id:173c1b8b-506e-4453-bd97-194cc6bc2bef

While trying to more log info as your instructed, I discovered while tracing

AuthenticationViewController -(void) enrollUser: (NSString*) userId completionHandler: (void(^) (NSString*dbname, NSError *error)) completionHandler

is trying to enroll the user via Facebook with

http://shop0813.bluecend.com//bluelist/enroll, and

the response is

404 i.e. file not found i.e.

{ URL: http://shop0813.bluecend.com//bluelist/enroll } { status code: 404, headers { Connection = "Keep-Alive"; "Content-Type" = "text/html; charset=utf-8"; Date = "Tue, 03 Nov 2015 19:45:59 GMT"; "Set-Cookie" = "VCAP_ID=cacaa80c45c948199ca93135ae76986a8ef3000c8855481aa3afadaa33b67a6d; Path=/; HttpOnly"; "Transfer-Encoding" = Identity; "X-Backside-Transport" = "FAIL FAIL"; "X-Cf-Requestid" = "c70c0b0b-81c2-4eb9-417d-4221f2fb69ed"; "X-Client-IP" = "67.198.78.64"; "X-Content-Type-Options" = nosniff; "X-Global-Transaction-ID" = 2269523159; "X-Powered-By" = Express; } }

I suspect the request is using the wrong url.

Upvotes: 1

Views: 98

Answers (2)

Joshua Alger
Joshua Alger

Reputation: 2132

Make sure you have successfully deployed the Node.js application that was supplied in the sample to your Bluemix backend. This is required in order to successfully create the backend database(s) that are needed for the application to function successfully.

Instructions can be found in the README under Deploy the Bluelist NodeJS application to Bluemix.

I can tell the node.js bluelist application is not currently running in your environment when attempting to access the following URL:

<APPLICATION_ROUTE>/bluelist/enroll

Currently when accessing your envrionment I see:

404 Not Found: Requested route ('<APPLICATION_ID>') does not exist.

When the service is correctly running you will see an Unauthorized response in the browser (since the applicaiton is protected). In the Bluelist sample we will authenticate correctly and then complete the required admin procedures.

Upvotes: 0

David R. Cariello
David R. Cariello

Reputation: 505

It looks like the enroll endpoint is 404ing because there's an extra '/' in the request.

Try removing the last '/' from your app route.

Change:

applicationRoute http://shop0813.bluecend.com/

to

applicationRoute http://shop0813.bluecend.com

and see if that works.

Upvotes: 0

Related Questions