How to fix Electron App not rendering on some Windows Server Machines? - windows

I installed my Electron Windows App on a fresh Windows 10, Windows Server 2016 Standard and Windows Server 2012 R2 Build 9600 and it is working fine. The connection to my websocket is also working.
On some machines with Windows Server 2016 Standard the app is not working as expected. I am just getting the windows border of the app but no content nor a menu. But the websocket connection of my app is working. ( i checked it with wireshark). so i guess it is a rendering problem?
Sadly i don't have access to the machines where the problem exists.
I assume same packages are missing?
screenshot with rendering problem:
Electron 5.0.2
Electron Store 3.2.0
Electron Prompt 1.3.1

I had the same issue as you mentioned, I solved it by generating a 32bit version of my Electron app for that Windows Server it did not work on.
Here is my build snippet from my package.json to generate both a 64 and a 32 bit version.
"build": {
"appId": "com.example.app",
"productName": "app",
"copyright": "Copyright © 2019",
"files": [
"build/**/*",
"node_modules/**/*"
],
"directories": {
"buildResources": "assets"
},
"win": {
"target": [
{
"target": "portable",
"arch": [
"x64",
"ia32"
]
}
],
"icon": "assets/app.ico"
}
},

Related

nrf52840 dongle debugging issue

I'm facing an issue to debug nrf52840 dongle rev 3.0 using a USB CDC application on top of BLE client application.
The same result was when using Fanstel based on nrf52840 connected via USB to the host as well.
In most cases unplugging and plunging the dongle force a target recovery after flashing the application.
When running the debugger it returns with the exception,
Cortex registers:
Disassembly viewer:
Using Cortex-Debug extension for VS Code. launch.jason as follows:
{
"version": "0.2.0",
"configurations": [
{
"name": "Cortex Debug",
"cwd": "${workspaceRoot}",
"executable": "${workspaceRoot}/_build/nrf52840_xxaa.out",
"request": "launch",
"type": "cortex-debug",
"servertype": "jlink",
"device": "nrf52",
"interface": "swd",
"serialNumber": "",
"armToolchainPath": "/usr/local/gcc-arm-none-eabi-6-2017-q2-update/bin",
"svdFile": "${workspaceRoot}/modules/nrfx/mdk/nrf52840.svd",
}
]
}
When I use BLE client application or USB CDC application, the debugger runs without any problems.

vscode unable to find executable for

I suddenly am unable to run and compile any code in Vscide, When I try I get the following error message.
unable to find executable for '</home/dennis/Programs/cpp/'
The launch.json reads
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "lldb",
"request": "launch",
"name": "Debug",
"program": "${workspaceFolder}/<executable file>",
"args": [],
"cwd": "${workspaceFolder}"
}
]
}
I am running linux mint 21.
It was working fine and then it suddenly stopped working. Something changed and I'm not sure what changed.
vscode about data.
Version: 1.73.0
Commit: 8fa188b2b301d36553cbc9ce1b0a146ccb93351f
Date: 2022-11-01T15:44:09.336Z
Electron: 19.0.17
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Linux x64 5.15.0-52-generic
Sandboxed: No
Can some one help me.
I tried running previouslly ran code that worked in vscode and they suddenly do not work

Disable an Outlook add-in for Windows and keep it enabled for Mac OS or vice-versa

I have a use case where our product can be installed on windows and/or macOS.
So if our product is not installed on either platform, does outlook add-in manifest provide any option to enable/disable on a specific platform or web ?
Ex:
Supported : Windows, Unsupported : MacOS, Browsers
Supported : MacOS, Unsupported : Windows, Browsers
Supported : MacOS, Windows Unsupported : Browsers
There is no such property or setting for web add-ins.
But you can use the Office.context object to determine at runtime the platform where the add-in is running. So, you could do proceed further or just disable any further actions in the add-in (inactivate it).
macOS (Outlook Desktop):
{
contentLanguage: "en-US"
diagnostics: {
host: "Outlook",
version: "16.47.314.0",
platform: "Mac"
},
displayLanguage: "en-US",
host: "Outlook",
isDialog: false,
platform: "Mac"
}
macOS (Outlook Web):
{
contentLanguage: "",
diagnostics: {
host: "Outlook",
platform: "OfficeOnline",
version: "0.0.0.0"
},
displayLanguage: "en-US",
host: "Outlook",
isDialog: false,
platform: "OfficeOnline"
}
There is no way to do this with Office Add-ins.

Problems debugging mserver5

I have recently started debugging the mserver5 application using vscode and a very comfy plugin for cmake called CMake Tools. Moreover, I am using gcc 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04) as a compiler together with the following launch.json debug configuration for mserver5 in vscode:
{
"version": "0.2.0",
"configurations": [
{
"name": "(gdb) mserver5 triangleDB",
"type": "cppdbg",
"request": "launch",
// Resolved by CMake Tools:
"program": "${command:cmake.launchTargetPath}",
"args": ["--dbpath=/home/mledl/dbfarm/triangleDB", "--set", "mapi_port=0"],
"stopAtEntry": false,
"cwd": "${workspaceFolder}/build",
"environment": [
{
// add the directory where our target was built to the PATHs
// it gets resolved by CMake Tools:
"name": "PATH",
"value": "$PATH:${command:cmake.launchTargetDirectory}"
},
],
"externalConsole": true,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{ "description":"In this mode GDB will be attached to both processes after a call to fork() or vfork().",
"text": "-gdb-set detach-on-fork off",
"ignoreFailures": true
},
{ "description": "The new process is debugged after a fork. The parent process runs unimpeded.",
"text": "-gdb-set follow-fork-mode child",
"ignoreFailures": true
}
]
}
]
}
The database I am connecting to (here triangleDB) has been created within a dbfarm using the monetdb application and I am going to connect to it using the mclient application with the default username and password combination monetdb. I can successfully connect to and query my triangleDB when starting it using the monetdb application withing a running dbfarm.
When starting up the mserver5 for debugging from vscode using the above launch.json file and connecting to it using mclient and the monetdb user I cannot authenticate somehow and get the following error printed to the mserver5 logs:
client1: createExceptionInternal: !ERROR: InvalidCredentialsException:checkCredentials:invalid credentials for user 'monetdb'
Does anybody know why mserver5 cannot retrieve the default user? Does it rely on the deamon monetdbd to retrieve the user data from? Can someone tell me what I am missing or how I can efficiently debug the mserver5?
Another point is that I need to set mapi_port=0 in order to make mserver5 bind to available ports since it is opening two mapi connections somehow when debugging with vscode and CLion. The application crashes when using a specific port since the second binding attempt will be on an already use address. The following section shows that two connections are opened when debugging:
# MonetDB 5 server v11.40.0
# This is an unreleased version
# Serving database 'triangleDB', using 24 threads
# Compiled for x86_64-pc-linux-gnu/64bit with 128bit integers
# Found 31.349 GiB available main-memory of which we use 25.549 GiB
# Copyright (c) 1993 - July 2008 CWI.
# Copyright (c) August 2008 - 2021 MonetDB B.V., all rights reserved
# Visit https://www.monetdb.org/ for further information
# Listening for connection requests on mapi:monetdb://localhost:46093/
# Listening for connection requests on mapi:monetdb://localhost:40387/
Thanks in advance for everybody that can help me out on this one. Looking forward to hearing from you and sty safe everyone.
If your database was created using monetdb and you want to start it directly using mserver5, you need to tell mserver5 where the .vaultkey is.
In you dbfarm, do a grep monet_vault_key merovingian.log, copy the whole --set monet_vault_key=/<path-to>/dbfarm/demo/.vaultkey and add this option to the start-up command of your mserver5.
I am giving an additional answer here, because I want to make clear what I had to do in order to debug the mserver5 using vscode and interact with it using the mclient application.
While trying to figure out why certain modules/libraries could not be loaded, I noticed that the GDK kernel is missing an environment variable called monet_mod_path which can be set using the --set monet_mod_path=/usr/local/lib/monetdb5 option for mserver5. The missing monet_mod_path has also been the reason why mserver5 listened on two addresses for a mapi connection.
I am now using the following command to start mserver5 for debugging:
mserver5 --dbpath=/home/mledl/dbfarm/triangleDB --set monet_vault_key=/home/mledl/dbfarm/triangleDB/.vaultkey --set monet_mod_path=/usr/local/lib/monetdb5 --set gdk_nr_threads=24 --set max_clients=64 --set sql_optimizer=default_pipe
A minimal working configuration would be the following one:
mserver5 --dbpath=/path/to/your/db --set monet_vault_key=/path/to/your/db/.vaultkey --set monet_mod_path=/usr/local/lib/monetdb5
Note: I installed the application into default installation directory. If you choose a custom one the monet module path has the following pattern:
monet_mod_path=/path/to/install/lib/monetdb5
I hope this answer will help someone in the future and saves all the investigation time I had to put in.

Error while installing .NET Core Debugger on OSX

I've installed the latest version of Visual Studio Code (1.1.1) in OSX El Capitan (10.11.4). I also installed the latest version of Core RC2. dotnet --version gives me 1.0.0-preview1-002702. One of the web threads I read said to delete the older version of OmniSharp and install the latest, which I did. I also installed OpenSSL via Brew.
When I installed the newest yo generator for aspnet and created a sample app, it runs fine. When I try to open that folder in Visual Studio Code, I get this in the Output window:
Downloading and configuring the .NET Core Debugger... Telemetry is:
Enabled log : Restoring packages for
/Users/rheckart/.vscode/extensions/ms-vscode.csharp-0.3.7/coreclr-debug/project.json...
info : Committing restore... log : Lock file has not changed.
Skipping lock file write. Path:
/Users/rheckart/.vscode/extensions/ms-vscode.csharp-0.3.7/coreclr-debug/project.lock.json
log :
/Users/rheckart/.vscode/extensions/ms-vscode.csharp-0.3.7/coreclr-debug/project.json
log : Restore completed in 632ms.
NuGet Config files used:
/Users/rheckart/.vscode/extensions/ms-vscode.csharp-0.3.7/coreclr-debug/NuGet.config
Feeds used:
https://www.myget.org/F/dotnet-core/api/v3/index.json
https://api.nuget.org/v3/index.json
https://www.myget.org/F/coreclr-debug/api/v3/index.json Telemetry is: Enabled Error: Can not find runtime target for framework
'DNXCore,Version=v5.0' compatible with one of the target runtimes:
'osx.10.11-x64'. Possible causes:
1. The project has not been restored or restore failed - run dotnet restore
2. The project does not list one of 'osx.10.11-x64' in the 'runtimes' section. Error:
System.InvalidOperationException: Can not find runtime target for
framework 'DNXCore,Version=v5.0' compatible with one of the target
runtimes: 'osx.10.11-x64'. Possible causes:
1. The project has not been restored or restore failed - run dotnet restore
2. The project does not list one of 'osx.10.11-x64' in the 'runtimes' section. at
Microsoft.DotNet.ProjectModel.BuildWorkspace.GetRuntimeContext(ProjectContext
context, IEnumerable1 runtimeIdentifiers) at
System.Linq.Enumerable.WhereSelectListIterator2.MoveNext() at
System.Collections.Generic.List1..ctor(IEnumerable1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source) at
Microsoft.DotNet.Tools.Publish.PublishCommand.TryPrepareForPublish()
at
Microsoft.DotNet.Tools.Publish.PublishCommand.<>c__DisplayClass0_0.b__0()
at
Microsoft.DotNet.Cli.CommandLine.CommandLineApplication.Execute(String[]
args) at Microsoft.DotNet.Tools.Publish.PublishCommand.Run(String[]
args) dotnet exited with error code 1 Error while installing .NET Core
Debugger.
I tried to do both steps 1 & 2, but I still get the same error. My project.json file looks like this:
{
"dependencies": {
"Microsoft.NETCore.App": {
"version": "1.0.0-rc2-3002702",
"type": "platform"
},
"Microsoft.AspNetCore.Mvc": "1.0.0-rc2-final",
"Microsoft.AspNetCore.Server.IISIntegration": "1.0.0-rc2-final",
"Microsoft.AspNetCore.Server.Kestrel": "1.0.0-rc2-final",
"Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0-rc2-final",
"Microsoft.Extensions.Configuration.FileExtensions": "1.0.0-rc2-final",
"Microsoft.Extensions.Configuration.Json": "1.0.0-rc2-final",
"Microsoft.Extensions.Logging": "1.0.0-rc2-final",
"Microsoft.Extensions.Logging.Console": "1.0.0-rc2-final",
"Microsoft.Extensions.Logging.Debug": "1.0.0-rc2-final"
},
"tools": {
"Microsoft.AspNetCore.Server.IISIntegration.Tools": {
"version": "1.0.0-preview1-final",
"imports": "portable-net45+win8+dnxcore50"
}
},
"frameworks": {
"netcoreapp1.0": {
"imports": [
"dotnet5.6",
"dnxcore50",
"portable-net45+win8"
]
}
},
"buildOptions": {
"emitEntryPoint": true,
"preserveCompilationContext": true
},
"runtimeOptions": {
"gcServer": true
},
"publishOptions": {
"include": [
"wwwroot",
"Views",
"appsettings.json",
"web.config"
]
},
"scripts": {
"postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
},
"tooling": {
"defaultNamespace": "rc2api"
},
"runtimes": {
"osx.10.11-x64": { }
}
}
If I try to run debug in VS Code using the .NET Core Launch (web), I get an error:
Debug adapter executable
'/Users/rheckart/.vscode/extensions/ms-vscode.csharp-0.3.7/coreclr-debug/debugAdapters/OpenDebugAD7'
not found.
Any ideas as to why this isn't working?
I received the same error. For me, I noticed there was an update available for the VS Code C# extension (I saw the green circle on the icon in the lower-left). Once I installed the update (version 1.0.10) and restarted VS Code, the error went away and I got "Successfully installed .NET Core Debugger".
I managed to resolve this by removing an older .NET Core version and installing the latest one. It appears the installation failed due to command line options the older version did not support.
Uninstall script and latest installation package can be found here (steps 1 and 2): https://www.microsoft.com/net/core#macosx

Resources