Page MenuHomePhabricator

'differential.creatediff' exception when repository paths contain SHIFT-JIS characters
Open, Needs TriagePublic

Description

when using 'arc diff' command , I met the same exception : "Invalid parameter information was passed to method 'differential.creatediff', could not decode JSON serialization. Data: 0".

Here is the message output by using 'arc diff --trace':

[2014-11-25 03:10:34] EXCEPTION: (ConduitClientException) ERR-CONDUIT-CORE: Invalid parameter information was passed to method 'differential.creatediff', could not decode JSON serialization. Data: 0 at [<phutil>\src\conduit\ConduitFuture.php:54]
#0 ConduitFuture::didReceiveResult(array) called at [<phutil>\src\future\FutureProxy.php:60]
#1 FutureProxy::getResult() called at [<phutil>\src\future\FutureProxy.php:37]

#2 FutureProxy::resolve() called at [<phutil>\src\conduit\ConduitClient.php:30]
#3 ConduitClient::callMethodSynchronous(string, array) called at [<arcanist>\src\workflow\ArcanistDiffWorkflow.php:482]
#4 ArcanistDiffWorkflow::run() called at [<arcanist>\scripts\arcanist.php:338]

Event Timeline

liu.jianfeng assigned this task to epriestley.
liu.jianfeng raised the priority of this task from to Needs Triage.
liu.jianfeng updated the task description. (Show Details)
liu.jianfeng added a project: Arcanist.
liu.jianfeng added a subscriber: liu.jianfeng.

Can you give us more specific steps to reproduce? Details on your install, software? We've put together a guide that should be helpful: https://secure.phabricator.com/book/phabcontrib/article/bug_reports/

I found that the project source's path contains Unicode characters(Japanese) .
I tested 'arc diff' in the folder without Unicode characters and it worked fine.

I am not able to reproduce this as you describe. I am able to use Unicode paths and filenames with arc diff without issue. Can you provide more details about your installation, which VCS you use, what version of Phabricator, what OS you use, etc?

You are welcome to use this server to upload a test diff to.

here's my environment.
VCS:SVN
Phabricator:newest (updated just now)
OS:windows 7(client) and ubuntu 12.10 (phabricator server)

here is the diff info.

What is your environment on Windows? (Shell/PHP Version)

I am using Microsoft windows cmd.exe on version 6.1.7601 and PHP on version 5.6.3 (cli).

I found that cmd's code page(encoding) is 932 which is SHIFT-JIS, but when I created todos using 'arc todo' command line with Japanese or Chinese characters, the same error appeared even only Japanese characters. Everything went well with English only.

Just linking this for continuity. GitHub #720

Oddly, for us this problem just "disappeared" but comes back intermittently. Any help would be apprecaited. Using Mac, Yosemite and Mountain Lion,

Jonathan$ php -v
PHP 5.5.14 (cli) (built: Sep 9 2014 19:09:25)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies

Thanks.

Broadly, JSON can not encode all data. T5955 will support alternate (binary-safe) wire encodings.

Things like transcoding Shift-JIS to UTF8 when the CLI is in Shift-JIS aren't directly covered by T5955, but we'll expand support for wire encodings first.

In general, UTF8 characters will work fine. Shift-JIS, binary data, and some text files with mixed encodings or non-utf8 data may not. See also T2999, T4045, and linked tasks.

epriestley renamed this task from 'differential.creatediff' exception to 'differential.creatediff' exception when repository paths contain SHIFT-JIS characters.Dec 13 2016, 12:22 PM