How to Fix the ERROR_INVALID_PORT_ATTRIBUTES Bug Check

Port misconfiguration is usually the reason behind this error

Reading time icon 3 min. read


Readers help support Windows Report. We may get a commission if you buy through our links. Tooltip Icon

Read our disclosure page to find out how can you help Windows Report sustain the editorial team. Read more

How to fix ERROR_INVALID_PORT_ATTRIBUTES
A message from our partner

To fix various driver issues on your PC, you will need a dedicated tool to find the freshest and the original drivers. You can use PC HelpSoft Driver Updater to do it in 3 easy steps:

  • Download PC HelpSoft Driver Updater and install it on your PC
  • Start the scanning process to search for outdated or missing drivers that cause problems
  • Right-click on Update Now to allow the update process.
Download now PC HelpSoft has been downloaded by 0 readers this month

The ERROR_INVALID_PORT_ATTRIBUTES is a system error code in Windows with the value 0x0000059E, which indicates that the attributes specified for a port are invalid. The complete error message is Invalid Object Attributes specified to NtCreatePort or invalid Port Attributes specified to NtConnectPort. This error typically occurs due to incorrect port configuration, driver issues, software misconfiguration, or hardware problems.

How do I fix ERROR_INVALID_PORT_ATTRIBUTES?

1. Check the port configuration (for advanced users)

  1. Press Windows + X and select Device Manager.
  2. Expand the Ports (COM & LPT) section to find the problematic port.
  3. Right-click the ports one by one and select Properties.
  4. Navigate to the Port Settings tab.
  5. Verify the attributes (e.g., baud rate, data bits, parity, stop bits, flow control) match the requirements of your connected device or application.
  6. Adjust the settings as needed and click OK.

2. Reset the Port to Default Settings

  1. Go to Device Manager and open the properties of the port as instructed in the previous solution.
  2. In the Port Settings tab, click Restore Defaults.
  3. Test if the issue is resolved.

3. Update or reinstall the port drivers

  1. Press Windows + X and select Device Manager.
  2. Expand the Ports section, then right-click the ports and select Update Driver.
  3. Choose Search automatically for updated driver software and follow the prompts.
  4. If that doesn’t work, select Uninstall Device instead.
  5. Confirm the uninstallation and restart your computer. Windows will attempt to reinstall the default drivers automatically upon reboot.
  6. Also, if you installed a new serial-connected device through the USB port, go to the manufacturer’s website and download the most recent driver for your system.

This can be a time-consuming operation so we recommend using one of the best driver updater tools from our list that will perform these actions automatically.

4. Test hardware connections

  1. Ensure the cables and connectors are securely plugged in.
  2. Replace any damaged cables or connectors.
  3. If using a USB-to-Serial adapter or similar, try plugging the device into another port.
  4. Connect the device to another computer to confirm that the hardware itself is functional.

5. Run Windows troubleshooter

  1. Press Windows + R to start the Run console.
  2. Type or paste the following command and press Enter: msdt.exe -id DeviceDiagnostic
  3. Follow the on-screen instructions to identify and fix issues.

The Hardware & devices troubleshooter will be removed from Windows but you can still use it and it’s very efficient to find and fix hardware-related issues.

Other possible solutions for ERROR_INVALID_PORT_ATTRIBUTES

  • Check the software or application using the port and ensure that the application’s port settings match the hardware configuration.
  • Check for app and OS updates to get the latest working versions.
  • If you suspect the issue lies with Windows, boot into a Linux environment (if available) to test the hardware and port functionality.
  • Use serial port testing tools (e.g., Minicom) to confirm the port is working correctly.
  • If none of the above steps work, the hardware might be faulty. Replace the device or port adapter and test again.

As a last resort, if nothing else works, contact the hardware component’s or device’s support team to help you troubleshoot the problem.

By following these steps systematically, you should be able to resolve ERROR_INVALID_PORT_ATTRIBUTES and restore the functionality of your port and connected device. Let us know in the comments below if you need additional assistance.

More about the topics: Error Code, ports

User forum

0 messages