microsoft / AL

Home of the Dynamics 365 Business Central AL Language extension for Visual Studio Code. Used to track issues regarding the latest version of the AL compiler and developer tools available in the Visual Studio Code Marketplace or as part of the AL Developer Preview builds for Dynamics 365 Business Central.
MIT License
745 stars 244 forks source link

Cannot publish (or debug) to BC 23 through VS code (AL language extension for BC 12.1) #7554

Closed faranmahboob closed 12 months ago

faranmahboob commented 1 year ago

Please include the following with each issue:

1. Describe the bug A clear and concise description of what the bug is.

Cannot publish an extension to BC 23. I have latest version of AL language extension for business central 12.1 as well. It was working on friday (20 th oct).

error on VS code


Please update the AL extension from the Visual Studio Code marketplace.

Additional information: Server details

AL extension details

2. To Reproduce Steps to reproduce the behavior:

  1. Go to '...'

Publish an extension to BC 23 with AL language extension for business central 12.1

AL code snippet that demonstrates the issue or a link to a code repository the developers can easily pull down to recreate the issue locally.

Note: Because the developers need to copy and paste the code snippet, including a code snippet as a media file (i.e. .gif) is not sufficient.

3. Expected behavior A clear and concise description of what you expected to happen.

4. Actual behavior A clear and concise description of what happened accompanied by images, animations, or a link to a video showing the issue occurring

5. Versions:

Final Checklist

Please remember to do the following:

DWarsop commented 1 year ago

Same issue here.

Switching to the latest Pre-Release version allows me to publish again. However debugging on that version seems to not work correctly, returning either an "Error: An internal error has occurred" or opening Business Central but not catching on breakpoints, so hitting issues either way.

faranmahboob commented 1 year ago

Same issue here.

Switching to the latest Pre-Release version allows me to publish again. However debugging on that version seems to not work correctly, returning either an "Error: An internal error has occurred" or opening Business Central but not catching on breakpoints, so hitting issues either way.

Yes, you are right, i can publish using pre release version but cannot connect Debugger

DiegoGCarcelen commented 1 year ago

Anybody has any workaround? I need to debug a BC23 session

GPetrites commented 1 year ago

Exact same symptoms here, though I am trying to start a new AL project.

Release version (v12.1.883011) fails on Download Symbols with error from first post above.

Both the prelease (v13.0.887907) and prior version (13.0.878831) are able to Download Symbols but fail when trying to debug with "Error: An internal error has occurred" as reported in second post above.

pborring commented 1 year ago

Support case was logged yesterday, issue being investigated

m2mal commented 1 year ago

Same issue if try to publish with debugging, but publish withouth debugging works fine Problem also occurs when you select "Start debugging without publishing."

BC Online "runtime": "12.1", "platform": "23.0.0.0", "application": "23.0.0.0",

faizansubhani commented 1 year ago

Did anyone get workaround yet ?

pborring commented 1 year ago

The originally filed issue with publish is fixed and new VSIX build released, but the issue with debugger is not. Everything currently points to a service infrastructure issue, high priority investigations ongoing, we understand the impact of debugger not connecting.

Current mitigations are

swomkbb commented 1 year ago

Hey... we had the debug issue yesterday on BC23 (debugger stops on wrong line), and we noticed that it was happening with the object that was using namespaces. If we had 7 lines of namespaces at the top of the object, the debugger was stopping 7 lines above the correct line. So take is as a hint, as maybe it has something with this issue ;)

NKarolak commented 1 year ago

@swomkbb The debugger stopping on wrong lines seems to be another issue, and it has been reported here: #7561 However, according to additional feedback on Twitter, it happens also on objects without namespaces 🤷

evilimkova commented 1 year ago

What I have found out is that it is somehow weirdly connected with accounts. I am not able to run debugger, my colleague was able to. If I use her account on my PC, it does not help. As soon as she used my account on her PC she is not able to debug anymore, even if she uses her account on her PC or even on completely different PC.

SBalslev commented 1 year ago

hat I have found out is that it is somehow weirdly connected with accounts. I am not able to run debugger, my colleague was able to. If I use her account on my PC, it does not help. As soon as she used my account on her PC she is not able to debug anymore, even if she uses her account on her PC or even on completely different PC.

This is an interesting behavior we have not seen. Did you debug the same environment before and after using your account?

evilimkova commented 1 year ago

@SBalslev yes we did, we run debug (works), clear credential cache, run debug (not working). Everything completely the same. Interesting is, that other colleague still can run the debugger on v23. And from the posts above it also looks like, that only some people have issues with not being to run debugger at all?

SBalslev commented 1 year ago

Would it be possible for you to share the environment details where it works for some users and doesn't for others - pm me or send an email to sbalslev @ microsoft.com

NavNab commented 1 year ago

@SBalslev check this also https://github.com/microsoft/AL/issues/7561#issuecomment-1782618189

Zoltero commented 1 year ago

I solved the problem temporarily by installing the previous version of AL.

justlucdewit commented 1 year ago

@Zoltero

I solved the problem temporarily by installing the previous version of AL.

what exactly do you mean with 'previous version of AL' the VSC extension? business central 22? the platform and application settings in app.json?

please give more details as i would like to have a temporary fix too ASAP

Zoltero commented 1 year ago

@justlucdewit

I mean the previous version of AL Language extension for MS 365 BC in VSC. I installed the version 12.1.883011

justlucdewit commented 1 year ago

@Zoltero

I see, thank your for your quick response. The issue I have with that solution is that 12.1.883011 seems to not be compatible with BC23 servers, and we are using a BC23 SAAS environment

the error that im getting when i use 12.1.883011 and try to publish is.

Error: This AL extension version for Visual Studio Code cannot be used with the specified server.
Please update the AL extension from the Visual Studio Code marketplace.

Additional information:
Server details
- Runtime: 12.1
- Web API: 6.0
- Debugger: 6.0

AL extension details
- Supported runtimes: 1.0, 2.0, 2.1, 2.2, 2.3, 2.4, 3.0, 3.1, 3.2, 4.0, 4.1, 4.2, 4.3, 4.4, 4.5, 5.0, 5.1, 5.2, 5.3, 5.4, 5.5, 6.0, 6.1, 6.2, 6.3, 6.4, 6.5, 6.6, 7.0, 7.1, 7.2, 8.0, 8.1, 9.0, 9.1, 9.2, 10.0, 10.1, 10.2, 11.0, 11.1, 12.0
- Supported Web API: 1.0, 2.0, 3.0, 4.0, 5.0, 6.0
- Supported debuggers: 1.0, 2.0, 3.0, 4.0, 5.0, 6.0
Zoltero commented 1 year ago

@justlucdewit

Have you tried to switch to the pre-release version? Maybe it will help?

justlucdewit commented 1 year ago

@Zoltero

I have but that still contains the issue of not being able to attach the debugger, as Microsoft hasnt fixed this yet as far as I am aware.

justlucdewit commented 1 year ago

@Zoltero Can you just quickly check what your BC version is?

I suspect you are publish to a BC22 environment, but that means your solution of using a 12.. version of the VSC extension would not work for people who work in BC23

Zoltero commented 1 year ago

@justlucdewit

I am developing for B23 with runtime 12.0. I am developing on a local container. We are making the main solution in pipeline in DevOps where I pushes my adjustments.

justlucdewit commented 1 year ago

@Zoltero ohhh, i think the issue that im having here is the runtime version. Im developing on a BC23 SAAS environment with runtime 12.1, which isnt supported by anything except 13.0.878831 and 13.0.887907

both of which have this issue unfortunately

harshilpatel984 commented 1 year ago

@NKarolak When we can expect the solution for this?, we have a deadline to acheive

justlucdewit commented 1 year ago

Im curious about this too,

Not being able to attach a debugger to SAAS environment is such a big critical issue, yet after a week there is still no solution or temporary fix (that works for us) in sight.

NKarolak commented 1 year ago

@harshilpatel984 I am not Microsoft, I am just as depending on the fix as you are ;-)

y0m0 commented 1 year ago

Not sure if this is any help at all, but I noticed that if it's the first time an extension is being published from vscode to a tenant, than vscode manages to successfully publish it and attach the debugger (F5). When trying to publish and debug a previously published app to the same tenant, no matter if it's a different environment, vscode manages to publish the app but the debugger wont attach and I get the internal error in the debug console.

btw I'am using AL pre-release against BC 23.0.12034.12676

justlucdewit commented 1 year ago

@y0m0 I noticed the exact same thing as you, however I also noticed that it seems to reset everytime I restart my machine.

The first time after a restart, I seem to be able to attach a debugger, but then a second time it gives me the error. Even restarting VSC doesn't help and I need to restart my entire system for it to reset.

But unfortunately eventho the debugger seems to attach, it also seems to completely ignore all of my breakpoints

SBalslev commented 1 year ago

The issue has been resolved and is being deployed in the current hotfix train.

We will be resuming upgrades as the changes are applied and the region is ready.

We're already now ready to open for upgrades in some countries and more will come soon.

MarcelMo commented 1 year ago

Is there a release date ? (In my case DE) Because the preview version of the sandbox has been removed today and now there is no way left to debug! Which is almost equal to no way left to develop...

danooooo1 commented 1 year ago

Same question here, can we get some date for release of this fix ?

SBalslev commented 12 months ago

The change is being rolled out and has already been applied in a lot of regions - it's scheduled for the remaining regions tonight so if everything goes as expected then you should have it by tomorrow.

MarcelMo commented 12 months ago

I don't mean to be too impatient, but still, even if I create a US sandbox only version available is 23.0.12034.12676. What "tomorrow" ? Which timezone ? In CET it is tomorrow... and I am sitting at work, still no debugger and I am supposed to startup a company. Do you have a version number for the fix ? And something I can tell my boss - about when I can continue working...

BestTrolley commented 12 months ago

Okay - the debugger is working (Region DE). Version is the same. Problem solved - I think

DWarsop commented 12 months ago

Debugger is now connecting and catching breakpoints for me in my (IE / W1) v23.0 sandbox (v23.0.12034.12676) on the non-pre-release VS Code version (v12.1.887908) so looks good to me.

danooooo1 commented 12 months ago

For me debuger on OnPrem (W1) with BaseApp version 23.0.12034.12841 still fires wrong line in DAL objects, in my new objects with no namspaces debuger works fine, any recommendations? I tried Repair-NavApp for all published apps, restart services, restart PC but debuger in AL extension v12.1.887908 for VS Code just doesnt work correctly

PSkok1 commented 12 months ago

For me debuger on OnPrem (W1) with BaseApp version 23.0.12034.12841 still fires wrong line in DAL objects, in my new objects with no namspaces debuger works fine, any recommendations? I tried Repair-NavApp for all published apps, restart services, restart PC but debuger in AL extension v12.1.887908 for VS Code just doesnt work correctly

It's the same for me, the debugger does not work on DAL objects.

kalberes commented 12 months ago

The SAAS issue should be fixed. There were two independent issues from our view (one from yours). The line handling bug on references (DAL) still present onprem will be fixed with the release of 23.1. See issue #7566

evandroeduardoflores1978 commented 1 week ago

Good evening, try following these steps: https://www.linkatualizado.com.br/bc-202410251950