Closed kopax-polyconseil closed 10 months ago
Hi @kopax-polyconseil, apologies for the delayed response.
You're right about --sourcemap-output
now requiring a path to the source map. It will generate a source map provided the path is accurate. In your input, there seems to be a typo with a comma: ',./build/CodePush/index.android.bundle.map'
. Please ensure all directories in the path are present.
As you've discerned, another option is to use the --sourcemap-output-dir
argument.
Previously, appcenter-cli
would produce a source map even without the --sourcemap-output
parameter if --output-dir
was defined. This was an unintended behavior, fixed in https://github.com/microsoft/appcenter-cli/pull/2099/.
Since you've found a solution, I'm closing this issue. Feel free to reach out with further queries.
@kopax-polyconseil , sorry for the confusion with ,
character. It was not your typo actually, but it is how appcenter-cli
works. You specified the argument --sourcemap-output
twice, so it thought it is an array :)
No I didn't, and it used to work, the only way arround we found was to use --sourcemap-output-dir
. It use to work well with --sourcemap-output
, this is a regression and the issue was due to the wrapping done here. I had no time to dig further, but I suggest you consider to reopen this :)
@kopax-polyconseil The reason it worked for you is that the --sourcemap-output option was effectively bypassed due to the lack of a specified value. Despite this, the sourcemap was still generated because of the presence of the --output-dir option. This, however, is not the intended behavior of these commands. To correctly generate the sourcemap, you should either use the --sourcemap-output-dir option or provide a specific path for the --sourcemap-output.
Description
We use to have our react native code push android/ios configured with sentry without issue since july 17th.
It seems that the command
appcenter codepush release-react
stopped to generate sourcemaps properly.--sourcemap-output
was used before but without any params, as a true/false flip, in order to generated source map.Source : https://learn.microsoft.com/en-us/appcenter/distribution/codepush/cli
Problem : the parameter seems now to expect a parameter and does not work as expected, if I pass a value, such as
--sourcemap-output ./build/CodePush/index.android.bundle.map
, it will fail with the following error (withDEBUG="appcenter-cli:*"
) :I have found by reading appcenter-cli source code that it can work using
--sourcemap-output-dir
instead, to generate the source mapRepro Steps
This used to generate source map using
--sourcemap-output
without value:Adding
--sourcemap-output ./build/CodePush
failExpected behavior
We expect
--sourcemap-output
to not breakDetails
appcenter codepush release-react