Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After updating to 1.4.0 the react-native extension no longer accepted as a debugger (for some people) #10148

Closed
MSLaguana opened this issue Aug 4, 2016 · 36 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug *caused-by-extension Issue identified to be caused by an extension debug Debug viewlet, configurations, breakpoints, adapter issues verified Verification succeeded
Milestone

Comments

@MSLaguana
Copy link
Member

  • VSCode Version: 1.4.0
  • OS Version: OSX 10.11.6

See microsoft/vscode-react-native#276 for original report by @aferust

Steps to Reproduce:

  1. Have React Native Tools extension installed
  2. Update vscode to 1.4.0
  3. Check whether "React Native" is an option when configuring a new project for debugging

When I attempted to replicate the issue on windows 10 and OSX 10.11.4 I was unable to and the extension continued to work normally, with "React Native" appearing in the list of possible debuggers. @aferust has attempted to re-install the extension and it continues to not show up as a debugging option.

@aferust
Copy link

aferust commented Aug 5, 2016

in addition to my bug report, vscode runs normally after downgrading to 0.10.10.

@kyo504
Copy link

kyo504 commented Aug 5, 2016

I also had the same problem and it's okay after rolling back vscode 1.3.1. Interesting thing is that when I installed vscode(1.4) and RN extentsion on my new iMac it worked fine. The problem occurs when vscode is updated.

@weinand weinand assigned isidorn and unassigned weinand Aug 5, 2016
@aferust
Copy link

aferust commented Aug 5, 2016

@kyo504
Could you please give me a download link for 1.3.1? My version of 0.10.10 is too old.

@isidorn
Copy link
Contributor

isidorn commented Aug 5, 2016

Works for me. There might be some issue with the update mechanism on your particular machine
@aferust you can get the latest vscode insiders here https://code.visualstudio.com/insiders

react

@isidorn isidorn removed their assignment Aug 5, 2016
@aferust
Copy link

aferust commented Aug 5, 2016

Thank you both @kyo504 and @isidorn. vscode insider worked perfectly!

@joaomoreno joaomoreno assigned isidorn and unassigned joaomoreno Aug 5, 2016
@kyo504
Copy link

kyo504 commented Aug 8, 2016

@aferust I'm sorry but even though I install vscode insiders(1.5.0-insiders), I still got the same error. When I trigger build, it fails with message like "reactnative not supported". Any thought on this?

@MSLaguana
Copy link
Member Author

@isidorn this has hit more people. Any idea if it is something to do with our extension that we can fix, or is updating to the insiders build the best hope?

@weinand
Copy link
Contributor

weinand commented Aug 17, 2016

@kyo504 I would like to better understand what problem you are really seeing. The initial problem description from above talks about a missing "React Native" entry in the list of possible debuggers when creating the launch config for a new project.

You are seeing a "reactnative not supported" when triggering a build. Since I do not know where this message originates from it would be great if you can provide a screenshot that shows the problem in the UI.

In addition could please verify that the RN extension is listed when you open the extension viewlet.

@weinand
Copy link
Contributor

weinand commented Aug 17, 2016

@MSLaguana you said that this has hit more people. Could you please provide the specific details of the issues they are seeing. From the information I see in this issue it is not clear whether this only a missing debug type or a missing RN extension.

@MSLaguana
Copy link
Member Author

@weinand I was just letting you know that more people have reported hitting this issue at microsoft/vscode-react-native#276

My understanding is that the missing "React Native" entry in the list of possible debuggers and "reactnative not supported" are both symptoms of the same underlying issue; that vscode is not registering our extension as providing a debugger for some people. If someone has already created a launch.json then they get "reactnative not supported" since that is the name of the debugger that is in their launch.json, and if they have not created one then they find "React Native" missing in the list when they attempt to do so.

@weinand
Copy link
Contributor

weinand commented Aug 17, 2016

@MSLaguana the debugger produces a different message for an unknown debug type:

2016-08-17_16-54-57

And @kyo504 saw the "reactnative not supported" message when triggering a build.

I just want to make sure that we are investigating in the correct direction...

@weinand
Copy link
Contributor

weinand commented Aug 17, 2016

@MSLaguana there is a typo in the enableBreakpointsFor attribute of the package.json in the 'React Native Tools' extension. It is incorrectly spelled enableBrekapointsFor. I do not yet know whether this is the culprit...

@MSLaguana
Copy link
Member Author

Ah, thanks for pointing that out. I'll fix that straight away. I would be surprised if that was the cause though, since it only impacts some people.

@tapir
Copy link

tapir commented Aug 24, 2016

Tried fixing the enableBrekapointsFor typo and unfortunately it didn't work.

@MSLaguana
Copy link
Member Author

@weinand any other suggestions, or ways we could try to get more information on how vscode is interpreting the extension?

@yimingtang
Copy link

yimingtang commented Aug 25, 2016

The same problem. I fixed the typo in package.json and restarted VS Code, no React Native debug environment showed.

I tried the nightly build too. The bug still exists.

VSCode: 1.4 + React Native Tools 0.1.5
VSCode Insiders: 1.5 + React Native Tolls 0.1.5

@isidorn
Copy link
Contributor

isidorn commented Aug 25, 2016

To summarize:

  1. Only some users see this issue after a vscode update
  2. After reinstalling the react native extension these users still see this issue
  3. This issue is still present in the vscode insiders
  4. This issue happens on all platforms

Does it help if the users manually delete the extension from the extensions folder and then reinstall it?

@tapir
Copy link

tapir commented Aug 25, 2016

Does it help if the users manually delete the extension from the extensions folder and then reinstall it?

It doesn't help.

@isidorn
Copy link
Contributor

isidorn commented Aug 25, 2016

Can you try installing the powershell, go or the c++ extension and double check if powershel / go / c++ are offered as possible debuggers when creating a new launch.json?

@tapir
Copy link

tapir commented Aug 25, 2016

I already have Go and yes I can see it along with c++ nodejs and vscode extension targets

@isidorn
Copy link
Contributor

isidorn commented Aug 25, 2016

Can you please try doing the following: F1> open developer tools > sources > open debugConfigurationManager.ts put a breakpoint on line 204. F1 > reload. Check what debug adapter types you get on each breakpoint hit and does react apear there.
You can see me doing this process in the following gif:

debugdebug

@weinand
Copy link
Contributor

weinand commented Aug 25, 2016

Could someone who experiences this problem try to disable (uninstall) all extensions but the React Native extension and then verify that the problem still exists.

@tapir
Copy link

tapir commented Aug 25, 2016

@weinand already done that multiple times

edit: I stand corrected. The culprit is flow extension !!!
I tried Go and C++ extensions and they are OK.

@yimingtang
Copy link

@weinand It works after I uninstalled all other extensions (VS Code Insiders).

@weinand weinand added *caused-by-extension Issue identified to be caused by an extension debug Debug viewlet, configurations, breakpoints, adapter issues labels Aug 25, 2016
@weinand
Copy link
Contributor

weinand commented Aug 25, 2016

@yimingtang can you confirm that the flow extension is the culprit?

@weinand
Copy link
Contributor

weinand commented Aug 25, 2016

@isidorn could you please install the flow extension and try whether you can reproduce this?
It would be still interesting to understand why the Flow extensions corrupts the React Native extension.

@yimingtang
Copy link

@weinand Awesome, you got it!
screen shot 2016-08-25 at 4 32 00 pm

@weinand weinand added the bug Issue identified by VS Code Team member as probable bug label Aug 25, 2016
@weinand weinand added this to the August 2016 milestone Aug 25, 2016
@isidorn
Copy link
Contributor

isidorn commented Aug 25, 2016

The issue was the the flow language support contributed an empty enableBreakpointsFor which led to the issue on our side when merging these attributes for adapters that contribute the same type.

There was an exception in the developer tools (F1 > toggle developer tools) which made this clear.

@weinand
Copy link
Contributor

weinand commented Aug 25, 2016

@isidorn why wasn't this exception not reported as an error for the flow extension? I remember that we once had this annoying notification that reported extension errors?
In addition, an exception in the flow extension should not prevent the React Native extension from loading correctly.
Please create issues for these two problems.

@isidorn
Copy link
Contributor

isidorn commented Aug 25, 2016

@weinand it was not reported because there was no underlying issue in the flow or the react extension. Flow extension properly contributes 'enableBreakpointsFor' while the react had a mistype thus not contributing anything. An extension does not have to contribute the 'enableBreakpointsFor'.

I agree that one extension should not prevent another from loading correctly and with this bugfix we have fixed this issue. Of course there may be others which we are currently unware of.

@weinand
Copy link
Contributor

weinand commented Aug 25, 2016

@MSLaguana here is the summary of our investigation:

VS Code had a bug in the code that merges debugger contributions: the merge code would fail if one contribution is empty.

This (rare) corner case was hit by the combination of the React Native and the Flow extension:
The typo enableBrekapointsFor resulted in an empty contribution and the Flow extension had another (unnecessary) contribution for enableBreakpointsFor. This made the merge code fail for the React Native debugger and the contribution of the debug type reactnative was dropped.

@Crash--
Copy link

Crash-- commented Sep 27, 2016

I ran into a similar issue with v1.5.3.

For my case it was not the flow extension but an another one (something like jsx beautify).

Here is my initial report :

Actual Behavior

  1. First I had to reconfigure the environnements after the upgrade
  2. When I want to run the debuger I got "Le processus de l'adapptateur de débogage s'est terminé de manière inattendue" "Ouvrir launch.json"

Expected Behavior

  1. I want the debuger to be launched!

Software versions

  • React-Native VS Code extension version: React Native Tools 0.2.0
  • VSCode version: Version 1.5.3 (1.5.3)
  • OS platform and version: macOS 10.11.6
  • React Native version: RN 0.33

Outputs (Include if relevant)

  • Output of the Debug Console (View -> Toggle Debug Console):
  • Output of the React-Native output channel (View -> Toggle Output -> Select React-Native in ListBox):
  • Output of the Developer Tools console (Help -> Toggle Developer Tools -> Select Console tab):
messageService.ts:119Le processus de l'adaptateur de débogage s'est terminé de manière inattendue : Error: Le processus de l'adaptateur de débogage s'est terminé de manière inattendue
    at Object._ [as create] (file:////Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:34:29245)
    at file:////Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:119:8772
    at Object.m [as _notify] (file:////Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:30:13448)
    at Object.B.enter (file:////Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:30:16953)
    at n.Class.define._run (file:////Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:30:18274)
    at n.Class.define._chainedError (file:////Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:30:17633)
    at n (file:////Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:30:15456)
    at n.Class.define.then (file:////Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:30:19083)
    at Object.R.enter (file:////Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:30:15525)
    at n.Class.define._run (file:////Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:30:18274)
    at n.Class.define._setCompleteValue (file:////Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:30:17968)e.doShow @ messageService.ts:119
messageService.ts:119Le processus de l'adaptateur de débogage s'est terminé de manière inattenduee.doShow @ messageService.ts:119

@MSLaguana
Copy link
Member Author

I'll also add that since this is using 0.2.0 of our extension, the enableBrekapointsFor typo has been fixed, so that should not be a factor.

@isidorn
Copy link
Contributor

isidorn commented Sep 27, 2016

@Crash-- please create a new issue for this - thank you

@Crash--
Copy link

Crash-- commented Sep 27, 2016

@isidorn I created an issue here microsoft/vscode-react-native#309 but @MSLaguana asked me to repost here... If I need to create a new issue, I will...

@isidorn
Copy link
Contributor

isidorn commented Sep 27, 2016

@Crash-- yes please create a new issue - thanks

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug *caused-by-extension Issue identified to be caused by an extension debug Debug viewlet, configurations, breakpoints, adapter issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

10 participants