2023-08-30

VNCViewer Timed out waiting for a response

Problem - VNC Viewer Timed Out waiting for a response from the host computer
Problem - VNCViewer client not responding

Windows 11 client, and a Raspberry Pi.

Article under construction.  Here are my notes.
An imperfect solution is listed below.
Consideration #3 has helped a lot of people, but was not a solution for my problem.

Symptoms: 
Desktop computer attempting to reach a VNC Server (in my case a Raspberry PI, acting as a server) gets ~ error

VNC Viewer 'worked before' or has worked "occasionally", or works one-time.

The host computer (the server) is operational and VNC is installed properly
The server is ping-able
VNC services are running

Waking the host-server (from sleep) did not solve the problem
Some sites recommended plugging in a monitor, keyboard, and mouse; nope; did not help

Diagnostics:

Confirm the service is running on the server:
From a remote SSH desktop connection (Putty.exe), run this console command:

sudo systemctl status vncserver-x11-serviced.service
(then ctrl-C to cancel/close the command)



Look for:
"Active (running) since <date>"  (green)
"Started VNC Server in Service Mode daemon" and
"ServerManager: Server started."

* You may see:  "ConsoleDisplay: Cannot find a running X server on vtl"
Other web articles suggest VNC will not operate without a monitor plugged-in and active. Nonsense. Many Raspberry pi's are "headless" -- without a monitor or keyboard.  Adding a monitor, keyboard, and mouse is not the solution to this problem.  This idea can be ignored.

Assuming VNC was installed properly; services started, IP Address ping-able, and all that nonsense, it can't be a problem with the server or with the VNC Server Services not running.  It can't be a problem with ports, firewall rules, or other configuration -- after all, it worked before...

Poor Solution:

This is a less-than perfect solution.

1.  From the Windows VNC Viewer Client, delete the Connection icon to your server
     (e.g. "keyliner.local") -- this is the connection that worked before, but does not now.

2.  Rebuild the connection from scratch.


This is asinine and indicates a possible problem in C:\Users\<you>\appdata\local\RealVNC folder

But after hours and hours of research, a proper solution was not found.


Considerations:

1.  Be sure to upgrade VNC and other services on the Server's desktop:

Even a new install, with a new distro, VNC needs to be updated.  From a terminal/console command window (putty.exe), or from the Raspberry pi's Terminal (console),

type sudo apt update
type sudo apt upgrade

(I noted the VNC service was updated during this patch cycle)

2.  Some articles recommend forcing a manual screen resolution

From a terminal/console command window (putty.exe), or from the Raspberry pi's Terminal (console),
type  sudo raspi-config
Select "Display Options"
Set "D5 VNC Resolution" to a fixed setting, such as 1280x1024  -- anything smaller than your Windows client's native desktop size.

This does not fix this immediate problem, contrary to other web articles.  However, setting a predictable resolution seems a good idea.


3.  Many have reported a bug in the Raspberry PI operating system, where a "headless" pi (one without a keyboard/mouse) does not generate a 'cached random-number pool' of some type.  (However, my pi has a keyboard and mouse installed (at least temporarily) and this did not help.  I discounted this idea.)

To solve this random-number problem, some sites suggest installing a program called "haveged".  Reportedly, this fixed VNC for many users, but it did not resolve the issue for me.  Regardless, here are the full details and credit in this article:
https://forums.raspberrypi.com//viewtopic.php?f=28&t=230779&p=1413648#p1413648

Not-recommended steps:
sudo apt-get install haveged
sudo update-rc.d haveged defaults


(to uninstall):
sudo apt remove haveged,
followed by sudo apt-get --purge remove haveged  )


Bad-to-Worse Solution:

Start a new VNC session: 

This is not necessarily a good idea, but will work (one) time per boot -- starting a second virtual desktop on the server -- a second copy, separate from the already-running service.  This seems a poor solution.  In any case, from the terminal/console window, type this command, launching a second VM (desktop)

vncserver

Test by launching the client's copy of VNC and make the VNC connection.  This should should work, but once you disconnect the client's VNC, you will not be able to make a second connection without rebooting the pi server.  Spinning-up a second instance of a VNC server masks the underlying problem.


Other notes

Installation


Starting and confirming the VNC Service on the Raspberry pi server:
Assuming VNC was not started or installed on your raspberry pi server, and assuming SSH was installed...

a.  Using Putty.exe on a Windows box (remote console)
     (Download from:  https://www.putty.org)

     Launch and connect to your server, from the local network (e.g.  my server: "keyliner.local")
     Login as  admini
     and the SSH password: 
       
b.  Type this command:  sudo raspi-config

c.  Select menu choice "Interfacing Options"
     Select menu choice I3:  "VNC"  Enable/disable; enable the service.

d.  The Windows VNC Viewer (client) can be launched in either a local, non-logged-in mode (recommended) or with a "cloud" (internet) account.  Both exhibit the same problem and I see little reason to build the RealVNC "cloud" account.

I have recommended bypassing the cloud login:

On your (Windows) workstation, download and install a VNC Viewer client.
     Download:  https://www.realvnc.com/en/connect/download/viewer/
     Select Standalone EXE x64 Installer

     On startup, note the link:  "Use RealVNC Viewer without signing in"
          (assuming a local network, not over the Internet)

     Connect to your server's name:  e.g.  "keyliner.local"


In Case Needed:  To Start the VNC Service:

As an alternative to raspi-config, from the remote console:

a.  sudo systemctl start vncserver-x11-serviced.service
     (where x11 is x-one-one.  There is no console response to this command)

To Enable VNC Service at next boot, and for every boot:
a.  sudo systemctl enable vncserver-x11-serviced.service


Resources:
Article on everything about VNC on Raspberry pi:
https://help.realvnc.com/hc/en-us/articles/360002249917-VNC-Connect-and-Raspberry-Pi#creating-and-remoting-a-virtual-desktop-0-8

-end


2023-08-21

Device ID Asset Tag Management

DeviceID is a computer-tagging program that shows the machine's current IP Address, device name, user, and network status.  In the background, an inventory is written to a local report and optionally to a server, which the helpdesk will appreciate.  Think of this as an Asset Tag.  

The program sits unobtrusively in the upper-right corner and periodically checks network conditions. 


Network status checks both internal and external IP addresses, confirming the machine can see the Internet.  Settings are adjustable and every object on this small panel is double-clickable, giving different reports, different features. 

Behind the scenes, DeviceID tracks an inventory of the hardware, free-disk space, OS settings, recent logins, and other interesting goodies.  If the report is allowed to live on a central server/share, the helpdesk can view activity, even if the user's machine is offline.  Inventory is tracked through simple ASCII files; no database required.

Free to download and use for all personal, commercial, and governmental use. 
* No registration
* No nagware
* No spying
* DeviceID does not call back to the mothership

Features:

  • Network status is periodically tested against internal (company) and external (Google) sites of your choosing.  Colored flags show the current status.

  • An inventory report shows the OS version, free-disk, memory, installed printers, CPU, the last 10 logins, etc..

  • Reminds users to reboot every (x) days.  Configurable from a central location. 

  • From a central server, the program can optionally run scheduled tasks, installation, and other routines. 
    This is not meant to replace a full-featured software installation server, but could be handy for a smaller business.

  • From a central server, emergency messages can be sent.  Alerts, such as "Database maintenance today at noon."  

Although this is a long article, and it seems complicated, it really only takes a minute to set up.  The advanced features can be ignored.  Although designed for small to medium-sized businesses, the program is useful on standalone machines.  I run this program on my home network, mainly for IP and network status.

Downloading and Installing:

Here are the fast installation instructions where the program can be run directly from the Downloads directory.  It needs a minor installation step.  
 
To install, download the .exe and place in any temp folder on your hard disk.  Double-click the .exe and you are done.  

 
A.  Download Link:

From Keyliner's public GDrive, click this link and download to a local temp or download directory.  Do not download directly into ProgramFiles. 

Download Link: Version 1.40 (New, 2026.10)
File Link:  DeviceID.zip - .zip with .exe and DLL's

(GDrive shows the contents of the .zip.  Click the download icon in the upper-left corner.)

deviceID.zip MD5 check:
33-49-17-3f-d6-42-f5-7b-f4-30-76-91-ad-39-ae-7f

SHA-256:
8baaaf9ec8e52050a373842170fe6f4592beba6c6d85069bcea1b749393810b3

When downloading, different browsers behave differently.
You may be prompted the file cannot be scanned.  Click "Download anyway"

Microsoft Edge:
Prompts "DeviceID.zip" was blocked because it could harm your device (it is contains a .exe from the Internet). 

"Click See More" and allow the download. 

With Microsoft Edge, the downloaded file appears in your Downloads directory with a random name, such as "Unconfirmed 780359.crdownloaded" (name varies).  Use File Explorer to rename the file to "DeviceID.zip".

B.  Mark the program as safe-to-run:

(This step may not be needed if downloaded by Edge and you clicked "More / Download Anyway")

Using File Explorer, right-mouse-click the downloaded (and re-named) .zip  

Select "Properties"
Check [x] Unblock.  This removes the "mark of the web." 

                 Click for larger view

* Only do this if you trust keyliner *and* only if downloaded from keyliner's public GDrive. 

If "Unblock" is not visible, it has already been unlocked (by Microsoft Edge).
Once [x] Unblocked is clicked, this security menu disappears. 

C.      Using File Explorer, create a temporary destination folder for the program
          For example:  C:\temp\deviceID

D.      From the download folder, double-click to open the .zip file
          Copy all files, including the .exe and the .dll's, as well as .json files

          Copy to C:\temp\deviceID  (a temporary run-from program directory)

E.      Administrators:  For a first-time run, launch with a setup switch
Click "Start" and immediately type the word "Run" (enter).  A Windows "Run" dialog opens.

From the Run box, use File Explorer to click and drag the downloaded "deviceID.exe" program into the run box (illustrated below).  Append a "/setup" switch and allow the program to run: 
DeviceID.exe /setup


Since keyliner cannot afford a signing certificate, you will be prompted that the file is not safe (being downloaded from the internet).  Click "more information" and allow the program to run.

Choose "[x] Server simulation" -- to just play with default setup values
Click "ok"

This writes two INI control files to the C:\temp\DeviceID directory.  

F.      From the same directory, re-launch DeviceID.exe a second time (without the /setup switch)
The program should be run normally.
See the Asset-tag panel in the upper-right corner of the primary monitor.
See the server-simulation-directory for your workstation's inventory file.  
 

Details:
/setup builds two .ini files, both stored in the simulated server (as a pretend local directory). 
The default settings will run as-is, which is good enough for initial testing:

C:\temp\deviceID\DeviceIDServer.ini     -- global server settings
C:\temp\deviceID\DeviceIDLocal.ini      -- instructions telling the .exe where the server is

Using Notepad, edit the ini files to see what they are up-to. 

DeviceIDLocal,ini 
Points to the server file and to an optional user-specific 'reminders' file (a calendar).  This file is stored with the .exe.  

Note: DeviceID.exe (and its dll's) plus DeviceIDLocal.ini, should be installed in the user's (C:\Program Files\util\DeviceID) folder, where they presumably do not have administrative rights to edit the file.

The DeviceIDServer ini describes shared network resources, messages, etc, and is intended to live on a shared, centralized server.  The server file contains global settings, a place to put messages, and other settings.  The DeviceIDLocal.ini points to the server .ini.

Note: DeviceIDServer.ini should be installed in a server directory, where again, end-users should not have rights to edit the .ini file.  It points to server inventory and batch-run resources.  (For this initial setup, with a server-simulation directory, the file is editable, just for your workstation.)  In other words, both .ini files should be protected.



For Production Installation:

To install the program 'more properly,' follow these slightly more advanced steps.  

Setup

1.  Server Share Setup

If you are not using a server, select the /SETUP option [x] ServerSimulation and skip the remainder of these steps -- no other setup is required.  In this mode, the program can only track one workstation's inventory.  But, if this program is run by multiple users, and you want the server inventory stored in a central location, continue with these steps.

Server steps:

a.  On a central drive share (typical for a business, but not for a home user), make a dedicated server folder to hold inventory and other minor configuration files.  

For example:

P:\Software\Util\DeviceID\wsConfig     //A server share
   (use any path - system .ini files live here)

P:\Software\Util\DeviceID\wsInventory 
   (workstation inventory reports live here)

 (It helps to pre-build these directories, but DeviceID will attempt to create them, provided your initial /SETUP account has rights.) 

b.  Set end-user rights: 

For P:\Software\Util\DeviceID\wsConfig, give all users to "Read-only" rights to this folder, with rights cascading down.

For P:\Software\Util\DeviceID\wsInventory, grant all users "Modify" rights.  Remove rights to build sub-directories.  Remove rights to delete.


2.  Complete the initial download, described above.

Open the .zip file
Copy the contents, including the .exe, .dll, .json, to a any temporary working folder (C:\temp\deviceID)

3.  From the temp directory, temporarily, launch the program using the /setup switch

a.  Click Start, type the word "Run".  Launch the Windows "Run" app.
b.  In the small Run box, use File Explorer and drag "DeviceID.exe" into the box.  (Or browse)
c.  In the RUN dialog, after the .exe, type {space} /setup
d.  Click OK and allow it to run


4.  Build Default Settings and Folders

From the Setup panel (which opens after typing /setup):
From the setup screen:

Click for larger size


Uncheck the ServerSimulation box
Browse to a server folder (P:\software\util\DeviceID) where the Inventory and ServerConfig files will roost - this is typically a server share.

Ideally, this folder should be pre-built.  If not, DeviceID attempts to create the directories, provided your /SETUP account has rights (usually not).  If you don't have rights, it will still record that path in the ini-control files, assuming you will fix the missing path later.  If not, copy the DeviceIDServer.ini from your server-simulation folder to the P: drive.

Click button "Build ini Files"

5.  Close the setup panel

Results:

New Directories:

a.  P:\Software\Util\DeviceID
b.  P:\Software\Util\DeviceID\WSConfig  (all users have READ only rights)
c.  P:\Software\Util\DeviceID\WSInventory (all users need Create/overwrite rights)
d.  C:\Users\(you)\prefs\DeviceID   (for workstation and user-specific data)

New INI files are built:

File and folder schematic:

Click for larger view


6.   Create a Program folder to hold the program:

a.  With File Explorer, open folder C:\Program Files,

b.  Create subfolders:   C:\Program Files\Util\DeviceID  (for example)

c.  Copy program files, plus the DeviceIDLocal.ini (from you test install)
     Copy into C:\Program Files\Util\DeviceID

(Details: From the .zip)
Copy "DeviceID.exe" to C:\Program Files\util\DeviceID (a folder)
Copy DeviceID.dll
Copy all other files, including all .dll's, and .json files to the workstation's 

From your original test run:  Copy "DeviceIDLocal.ini" to C:\Program Files\util\DeviceID

Do the copy as a two-step, copying from the download folder into Program Files.  Windows security will not let you download directly from the Internet into Program Files (technically, you will not be able to remove the "mark of the web" if downloaded directly into Program Files).

Store DeviceIDLocal.INI purposely in C:\Program Files.  Reason: Most end-users (should not) have administrative rights and won't be able to edit the file.  This is by design.  This forces their connection to the server-share.

7.  Position the Server Control file

a.  Copy your test DeviceIDServer.ini  to
     P:\software\util\DeviceID\wsConfig

(if using [x] Server simulation, everything points to the C:\Temp directory. )

b.  Edit DeviceIDServer.ini

     Confirm ServerInventoryDirectory is  P:\Software\util\DeviceID\WSInventory

     Set InternalTestSite   to a ping-able internal test server or leave blank
     Set ExternalTestSite  to www.google.com
     Set ExternalIPAddressTestSite to some known outside entity, such as https://api.ipify.org

     Save the ini

8.  Confirm C:\Program Files\Util\DeviceID\DeviceIDLocal.ini
     points to P:\software\util\DeviceID\WSConfig\DeviceIDServer.ini

9.  Optional: Create a Start Menu Tile:

Using File Explorer, tunnel to C:\Program Files\util\DeviceID
Right-mouse-click the executable and "Pin to Start"
Launch the program now to test.  See upper-right on the primary monitor

Better:  Use Auto-launch steps


8.  Auto Launching:

DeviceID should be set to auto-launch at boot using the Windows Startup Folder.  
Startup Folder steps:

a.  Using File Explorer, tunnel to
C:\Users\<you>\AppData\Roaming\Microsoft\Windows\StartMenu\Programs\Startup

b.  In the Startup folder, right mouse click a blank area on the detail side, "create shortcut".

Set the path to
C:\Program Files\Util\DeviceID\DeviceID.exe. 

Set the Start In folder to:  C:\Program Files\util\DeviceID




No other switches are required. 
This assumes the local.ini file is also inside that directory, pre-written and ready.


Testing

With setup complete, and assuming the ServerSimulation (or server directory),

- Reboot the computer to confirm auto-start, or 
- Use File Explorer to double-click the .exe, which launches the program.

Expected results:

a.  Program loads in upper-right corner, Network Status = (green)

b.  Folder C:\Users\<you>\Prefs\DeviceID has a local inventory report.  On my computer this is called "Oscar.txt", where Oscar is my workstation's Name.

c.  Using FileExplorer, see folder 
P:\Software\Util\DeviceID\WSInventory
(or C:\temp\ServerSimulation\DeviceID\WSInventory)

for the server version of this same report.  
(The helpdesk can research this folder even if the workstation is offline.)

d.  On the running program, double-click the workstation's name for small report.

e.  On the running program, double-click the word "DeviceID" for full workstation report

f.  Optionally: On the running program, double-click your user-id.  Allow it to build a reminder file, such as "Bob's birthday on 08/22". 

g.  Hover the mouse over IP Address to see the external-facing IP address.


Off Network Workstations

If the workstation is off network (and it can't detect the Server.ini), the program disables all server-related activity but still runs and can still test network status and display reminders.

When off-network, the External Test Site temporarily defaults to www.google.com, in case your default pingable server was different (these preferences are on DeviceIDServer.ini).  Colored status indicators continue to work.  The Internal Test Site will ping the workstation's x.x.x.1 IP Address.

The local inventory is still written to C:\Users\<user>\prefs.  This can still be opened, emailed, etc.


For Documentation:  Generated INI files:

Example DeviceIDLocal.ini

(at each workstation)

;DeviceID Local INI Control File
;Directs DeviceID to the ServerControlFile; must be in current DeviceID.exe directory
;Position-dependent file; do not change structure or line counts

ServerControlFile             = C:\temp\ServerSimulation\DeviceID\WSconfig
                                                         \DeviceIDServer.INI
LocalReminderFile             = C:\users\<username>\prefs\DeviceID
                                                          \DeviceID_Reminder.ini
WorkstationOffsiteFlag        = N
LocalDisableRebootNagSW       = N
LocalDisableRunEventsSW       = N
LocalHorizontalOffsetPixels   = 0
LocalVerticalOffsetPixels     = 0


Example DeviceIDServer.ini

(At the server's WSConfig folder)

;DeviceID
;ServerControlFile DeviceIDServer.INI; Do not delete
;Note: Workstations have a local file that points to this file
;Example location:  \\Server\Share\Util\DeviceID\Config\DeviceIDServer.INI

[General]
ServerInventoryDirectory              = C:\Data\proj\util\DeviceID\serverSimulation\DeviceID\WSInventory
DefaultLocalReminderINI               = C:\Users\<username>\prefs\DeviceID\DeviceID_Reminder.ini
ActiveDirectoryLDAPPath               = cn=prod,dc=mycompany,dc=com
DefaultHomeDataDirectory              = H:\Data
PhysicalLocation                      = Main Campus

InternalTestSite                      =
ExternalTestSite                      = www.google.com
ExternalIPAddressTestSite             = https://api.ipify.org  ;Shows external-facing IP address

RebootNagWarningDaysYellow            = 5
RebootNagPromptDaysRed                = 7

[Launch Run Events]
;This event can be set to run on program launch.  This is a one-time event per launch.
RunAtLaunch                           = N
RunAtLaunchCommand                    =
RunAtLaunchParameter                  =
RunAtLaunchMarkerFileName             =

[Emergency Run Events]
;Run these events in an Emergency with an optional user prompt
;Caution: RunLine is and can be called multiple times; manage duplicate runs with Run Once Marker Filename
;When used, Usually RunAtLaunch=Y, RunAtHourlyCycle=Y, with marker filename, for fastest results
EmergencyRunAtLaunch                  = N
EmergencyRunAtHourlyCycle             = N
EmergencyPromptMessageHeader          = Important Message:
EmergencyPromptMessageLine1           = This is an example emergency message
EmergencyRunCommand                   = notepad.exe
EmergencyRunParameter                 =
EmergencyRunMarkerFileName            =


Broadcast Messages

DeviceID can broadcast emergency messages to workstations.  This is only useful for those workstations on-network.

Set an example emergency message:

The program can optionally connect to a server to show simulated company-wide messages or can run a company-wide .exe / installation program.  

With your copy of DeviceID still running,

Edit the DeviceIDServer.INI file
If running the [x] ServerSimulation, see:  C:\Temp\ServerSimulation\DeviceID\WSConfig\DeviceIDServer.ini

If running on the network, find where the workstation's Server.ini by double-click the word "DeviceID" on the running program.  This opens the workstation's local inventory file.  Note the "ServerInventoryFileName".  With notepad, open *.* all files.  Locate "DeviceIDServer.ini"

- Set "EmergencyRunAtLaunch = N   (no need for this test)
- Set "EmergencyRunAtHourlyCycle = Y
- Set "EmergencyPromptMessageLine1 = "Database maintenance tonight"

Leave all other Emergency fields blank.
Save the file.

Results:  After roughly an hour -- and every hour after that -- all users running DeviceID will see the database maintenance message.

Put a limit on how many times the Emergency Message can run
Edit the file again. 

Set "EmergencyRunMarkerFileName" to something like: 
2026.1101-DatabaseMaint.txt  (any made-up, but unique, never used before name). 

Save the server configuration file.

Results: After another hour, all users are bugged once, then never again

Marker files are stored per workstation.  See C:\Users\<you>\prefs\DeviceID. 
Delete the marker file and they will be nagged again (provided that same marker is still active).
Recommend using unique marker file names with any Emergency Run. 
Only one Emergency can run at-a-time.

The hour delay is randomized and is designed to keep the server from being overwhelmed if everyone logs in at 8:00am.

* The Server configuration file must be religiously guarded against edits and malicious actors.  Rights to edit this file should be limited to service accounts.


Testing Comments

Because of the [x] ServerSimulation, the WSInventory directory will only have inventoried a single workstation -- yours.   In real life, all workstation writes to this directory.  Fifty workstations = fifty files. 



I would appreciate hearing about your experiences with this program.

Version History:
1.10 Initial Release
1.11 Generates inventory report on demand, not just at launch.  Double-click label. Ping testing less aggressive if all "green". 
1.20 Added External-facing IP Address reporting.  Click once, then hover on displayed IP Address.
1.30 Added OneDrive backup for Reminder.INI file; Reminders now move across machines via OneDrive.  If OneDrive not available, feature disables.
1.40 Converted to the newer .dotNet 10 runtime libraries.  No other changes.


Related Keyliner Programs
Midy5 Checksum finder
Directory Pulse Disk Management

The program is a free keyliner-developed application, with no registration, no sign-in, no ads, and does not call the mothership.  Write this program yourself!  This started out as a Student project in my book War and Peace Programming Volume 6 (Visual Studio C#) - Project 4.     




2023-08-14

Error - Thunderbird - Your message was sent but a copy was not placed in your sent folder

 Error - Thunderbird - Your message was sent but a copy was not placed in your sent folder

"Your message was sent but a copy was not placed in your sent folder (Sent) due to network or file access errors.  You can retry or save the message locally to a local folders/Sent."

Plus: "Status: Copy failed"

Problem:
When sending an outbound email
Likely, you had just recently completed other Outbound SMTP email changes or the message you are trying to send was previously written before SMTP changes were completed.

Solution:

At least for me, the solution was to close and re-open the Thunderbird client.
Then re-compose a new test message.

(and, I am assuming you are using IMAP, where message are synced to the client and to the server - recommended.)

This fixed my problem.
Other articles recommended rebuilding folders, going into the Thunderbird's settings and changing how Outbound emails are stored (storing them locally), turning off Oauth2, turning off TLS, and other nonsense.

Error - Thunderbird SMTP login to server smtp.office.365.com failed

Error - SMTP login to server smtp.office.365.com failed
Error - Unable to authenticate to Outgoing server (SMTP) smtp.office.365.com.  Check the password and verify the 'Authentication method' in 'Account Settings | Outgoing server (SMTP)

Summary: 
A change is required in a default O365 setting.
This example uses GoDaddy, which is hosting my O365 email.  Your email provider will have similar steps.

(O365 / Office.com will not host your email directly, they always go through a third-party)
Note:  O365 has been renamed to "Microsoft 365".  Microsoft has a branding problem.

Symptoms:
Thunderbird email client (version 115 and newer) displays ~ messages.
Receiving emails is not a problem. 
Error appears only when sending.

This can happen with other email clients, other email providers.
The email client must be capable of logging into O365 new OAuth2 authentication methods (with Mozilla Thunderbird, version 85 or newer). 

Solution:

Assuming you are using IMAP email.
Assuming you are using GoDaddy.com (suspect other email providers follow similar steps)

Confirm these SMTP email settings: 

Likely already correct:

A.  In Thunderbird, "Account Settings", "Server Settings"

     Confirm:  Server Name:  outlook.office365.com   Port 993
     Confirm:  Connection Security:  SSL/TLS
     Confirm:  Authentication method: OAuth2

B.  In "Account Settings", "Outgoing Server (SMTP)"
 
    "Edit"
    Confirm server name:  smtp.office365.com
    Port 587
    Connection Security: STARTTLS
    Authentication method:  OAuth2

    Note: By design, with OAuth2, there is not a typed password

Change this O365 Email setting:

1. Login to GoDaddy
2. At the Email Dashboard, in "Account Information", click "Advanced Settings"

3.  Enable (turn on) "SMTP Authentication"

4.  Important:  Wait (apx 24 hrs) before this change takes effect.   Yes, you must wait.

5.  Testing:  The next day, open Thunderbird: Send a test email.


Other sites, other articles, recommend turning off SSL/TLS.  No.  Don't do that.  Others recommend using a user-ID/password for the SMTP login (turning off OAuth2).  No, don't do that either.  While these workarounds will solve the problem, they miss the point -- fixing the symptoms, and causing other security problems.

You will not need an Windows app password, as suggested by other sites.

I would appreciate comments on how to do this with other, non-GoDaddy email providers.