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

Script ends with error messages #58

Open
malue19 opened this issue Aug 5, 2019 · 13 comments
Open

Script ends with error messages #58

malue19 opened this issue Aug 5, 2019 · 13 comments
Labels

Comments

@malue19
Copy link

malue19 commented Aug 5, 2019

Hey @waldo1001 ,
when I exectue your script:
https://github.com/waldo1001/Cloud.Ready.Software.PowerShell/blob/master/PSScripts/NAV%20Docker/LocalDocker/_ExportObjectsAsAL.ps1

I get the following errors.
Unfortunately the output is partially in German.
If you need the whole text, I can translate it for you.

ErrorMessages

And here is you adjusted script:

ExecutedScript

Thank you :)

@waldo1001
Copy link
Owner

Few questions:

  • are you running this on the insider-build? if so - won't work, because no C/AL anymore - the objects are already in AL
  • did you install my powershell-cmdlets on the container? can be done by:
Install-NCHDependentModules `
        -ContainerName $ContainerName `
        -ContainerModulesOnly

@malue19
Copy link
Author

malue19 commented Sep 10, 2019

Unfortunately it is not possible for me to install your powershell-cmdlets...

grafik

I opened Windows Powershell ISE and copied your code from above. Then I executed it and I got the error message:

grafik

Here the error message in English:
The file was not recognized as the name of a cmdlet, function, script file, or executable program.

Can you explain me, how to solve this?

@waldo1001
Copy link
Owner

I think you didn't install the "CRS.NavContainerHelperExtension" module?

you can do that with:

install-module 'CRS.NavContainerHelperExtension' -force

@malue19
Copy link
Author

malue19 commented Sep 10, 2019

Ok, your advice helped me to install the modules, but when I execute your script from here:

https://github.com/waldo1001/Cloud.Ready.Software.PowerShell/blob/master/PSScripts/NAV%20Docker/LocalDocker/_ExportObjectsAsAL.ps1

I get the following error output in the PowerShell:

grafik

Where is my mistake?

@KristofKlein
Copy link
Contributor

nav container 0.5.0.2 ... current version is 0.6.4.0 --- maybe that's the problem with at least the last message.

@malue19
Copy link
Author

malue19 commented Sep 10, 2019

And how can I solve this?

@waldo1001
Copy link
Owner

Update it:

install-module navcontainerhelper -force

@KristofKlein
Copy link
Contributor

What I tend to do If it does not end up to be working: I remove all possible sources of the module from the harddrive (that would be in the program files folder and under Documents\WindowsPowerShell\Modules) and than run install-module again.
I even start my scripts with
uninstall-Module -Name NavContainerHelper -Force
Install-Module -Name NavContainerHelper -Force
Import-Module -Name NavContainerHelper -Force
just to make sure I only have the latest version of the module and not some older versions somewhere.

@malue19
Copy link
Author

malue19 commented Sep 11, 2019

I updated the navcontainerhelper, but again I get an error message:

grafik

And here the error message for the Join-Path:
"The argument can not be bound to the parameter Path because it is an empty string."

@waldo1001
Copy link
Owner

For this script, you can comment the first line - it doesn't need settings.. . Your first error will disappear.

Second error is a mistery. I don't know how your setup is, but it just works in a default docker container (just tried). You'll have to find out why you are not able to export that file.

Try to debug?

@malue19
Copy link
Author

malue19 commented Sep 11, 2019

You were right, first error message has disappeared ;)

@KristofKlein
Copy link
Contributor

are you running as admin?

@malue19
Copy link
Author

malue19 commented Sep 11, 2019

The WindowsPowerShell I am running as Admin.

I thought the reason for the error message could be, that my container was unhealthy, that is why I created a new one with the following image: microsoft/bcsandbox:latest-ltsc2016

Then I ran all your commands from above, but again I get the same error message...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants