私はWebサーバーにassetlinks.jsonファイルを設定して、モバイルアプリでディープリンクを処理し、ウェブサイトとモバイルデバイスでログイン資格情報を共有する必要があることを示していますassetlinks.jsonがERROR_CODE_MALFORMED_CONTENTを確認していることを確認してください
私はdevlinkサーバー(https://devtesting.narrpr.com/.well-known/assetlinks.json)にホストされているassetlinks.jsonファイルを持っています。私はそれをテストするためにthis urlを実行すると
[{
"relation": ["delegate_permission/common.get_login_creds"],
"target": {
"namespace": "web",
"site": "https://devtesting.narrpr.com/"
}
},
{
"relation": ["delegate_permission/common.get_login_creds", "delegate_permission/common.handle_all_urls"],
"target": {
"namespace": "android_app",
"package_name": "com.rpr.mobile",
"sha256_cert_fingerprints": [
"D3:7B:D8:D7:47:AF:08:2E:BA:EF:02:96:8C:F2:3A:1A:46:F9:B0:81:E9:E3:6D:BA:01:3C:00:59:95:39:8D:21"
]
}
}
]
、それはエラーを与える:デバッグ行で
{
"maxAge": "599.999999890s",
"debugString": "********************* ERRORS *********************\n* Error: invalid_argument: Could not parse statement list (not valid JSON): \\357\\273\\277[{\\r\\n\\t\\t\\\"relation\\\": [\\\"delegate_permission/common.get_login_creds\\\"],\\r\\n\\t\\t\\\"target\\\": {\\r\\n\\t\\t\\t\\\"namespace\\\": \\\"web\\\",\\r\\n\\t\\t\\t\\\"site\\\": \\\"https://devtesting.narrpr.com/\\\"\\r\\n\\t\\t}\\r\\n\\t},\\r\\n\\t{\\r\\n\\t\\t\\\"relation\\\": [\\\"delegate_permission/common.get_login_creds\\\", \\\"delegate_permission/common.handle_all_urls\\\"],\\r\\n\\t\\t\\t\\\"target\\\": {\\r\\n\\t\\t\\t\\t\\\"namespace\\\": \\\"droid\\\",\\r\\n\\t\\t\\t\\t\\\"package_name\\\": \\\"com.rpr.mobile\\\",\\r\\n\\t\\t\\t\\t\\\"sha256_cert_fingerprints\\\": [\\r\\n\\t\\t\\t\\t\\t\\\"D3:7B:D8:D7:47:AF:08:2E:BA:EF:02:96:8C:F2:3A:1A:46:F9:B0:81:E9:E3:6D:BA:01:3C:00:59:95:39:8D:21\\\"\\r\\n\\t\\t\\t\\t]\\r\\n\\t\\t\\t}\\r\\n\\t}\\r\\n] [0] while fetching Web statements from https://devtesting.narrpr.com./.well-known/assetlinks.json (which is equivalent to 'https://devtesting.narrpr.com/.well-known/assetlinks.json') using download from the web (ID 1).\n********************* INFO MESSAGES *********************\n* Info: No statements were found that match your query\n",
"errorCode": [
"ERROR_CODE_MALFORMED_CONTENT"
]
}
それはしかしjsonlintが異なるために頼む、それが有効なJSONではないと言います。私が間違っていることは何か考えていますか?
名前空間を変更した後も、同じ「無効なJSON」エラーが表示されます。 – Justin