All Products
Search
Document Center

Mobile Platform as a Service:Troubleshoot real-time log pull failures (iOS)

Last Updated:Feb 03, 2026

Problem description

During development, developers often use the log component to print information to the console. This helps them quickly locate and troubleshoot problems.

After an app is released, developers can use the client diagnostic log API provided by the mPaaS client software development kit (SDK) to record logs. These logs can then be pulled from the console. However, incorrect integration or usage can prevent you from pulling these diagnostic logs.

Reproduce the problem

  1. Log on to the console. Go to Products and Services > Mobile PaaS > Mobile Analysis Service > Log management > Pull real-time logs. Click Add to open the page for creating a diagnostic task. Then, fill in the diagnostic task details as prompted.

  2. After you fill in the details, click OK to create the diagnostic task. Once the task is created, click Trigger Push/Sync to send it to the client. The task status on the page updates after the task is sent.

  3. After the client receives the diagnostic task, it uploads the logs to the server. The task status then changes to Task successfully processed. You can then click View to go to the subtask details page and click Download to download the logs.

Result Analysis

A task can have the following statuses:

  • nitialization completed

  • Calling Sync service succeeded (iOS, only calling Sync service, not sending to the client)

  • Calling Push service succeeded (Android, only calling Push service, not sending to the client)

  • Calling Sync service failed (iOS)

  • Calling Push service failed (Android)

  • Task successfully processed

  • Task failed

  • Partial tasks failed

A subtask can have the following two statuses:

  • Expired or permission restricted

  • Completed

Normally, following these steps lets you pull diagnostic logs. The task status will be "Task processing complete" and the subtask status will be "Processing complete". When an error occurs, the most common scenario is that the task status is "Task processing complete", but the subtask status is "Expired or no permission". This indicates that the pull failure may be caused by one of the following reasons:

  • The diagnostic log has expired and has been deleted from the client.

  • Binary log generation failed because the client does not have file write permissions.

  • The client log generation failed for other reasons.

Troubleshoot the problem

Check if MSS registration was successful

On the iOS platform, log pulling depends on the MSS service. Therefore, you must first confirm that the client MSS service is working correctly. You can check this by observing the log output for the Sync category in the console. The following examples show the log output for normal and abnormal MSS component connections.

If MSS is not working correctly, resolve the MSS service connection issue first.

  • Normal MSS component connection

2020-03-25 11:19:33.873603+0800 Demo[24958:6621533] [Sync] start sync ssl:cn-hangzhou-mss-link.cloud.alipay.com,settings:{
2020-03-25 11:19:33.873873+0800 Demo[24958:6621533] [Sync] LL socket connect SUCESS!
  • Abnormal MSS component connection (The following example shows a failure caused by a network issue)

2020-03-25 11:16:53.624467+0800 Demo[24452:6612201] [Sync] LL connectToHost=cn-hangzhou-mss-link.cloud.alipay.com port:443
2020-03-25 11:16:53.627994+0800 Demo[24452:6612201] [Sync] LL onSocket:willDisconnectWithError:err Error Domain=NSPOSIXErrorDomain Code=50 "Network is down"

Checking Whether Local Logs Are Written to the Sandbox

Important

Perform this check while disconnected from the network.

After you confirm that your code includes an action to write binary logs, go to the app sandbox path Library/file/<date>/11.2nd. Check if files similar to the following are generated.

Important

When you check the files, make sure their creation and modification times match your test time.

2

If you cannot find the relevant logs in the sandbox, review the integration process for the client diagnostic component. If the problem persists, prepare a project that can reproduce the issue and search for the DingTalk group number 145930007362 to join for further assistance.

Check if the pull action instruction reaches the client

After you trigger the Sync action in the mPaaS log pull console, observe the client console output. Check if the related instruction is received through MSS, for example: 4

If the instruction is never received, check the network connection and confirm that the user ID is correct. If the problem persists, search for the DingTalk group number 145930007362 to join for further assistance.