I'm going to ask you to post some additional information that might help us to identify the problem.
Please do this:
Close all Arduino IDE windows.
Start the Arduino IDE. (this restart was done to get a blank console pane)
Select Tools > Board > Boards Manager from the Arduino IDE's menus.
After the process fails, click the Close button.
Click on the black console pane at the bottom of the Arduino IDE window.
Press Ctrl+A to select all the text.
Press Ctrl+C to copy the selected text to the clipboard.
Open a forum reply here by clicking the Reply button.
Click the </> icon on the post composer toolbar. This will add the forum's code block markup (```) to your reply to make sure the error messages are correctly formatted.
Press Ctrl+V. This will paste the compilation output into the code block.
Move the cursor outside of the code block markup before you add any additional text to your reply.
Error downloading https://downloads.arduino.cc/packages/package_index.json
WARNING: Error loading hardware folder C:\Users\jgoodall\Documents\Arduino\hardware\esp8266com
No valid hardware definitions found in folder esp8266com.
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at cc.arduino.contributions.packages.ui.ContributionIndexTableModel.lambda$updateContributions$1(ContributionIndexTableModel.java:90)
at java.util.TimSort.binarySort(TimSort.java:296)
at java.util.TimSort.sort(TimSort.java:221)
at java.util.Arrays.sort(Arrays.java:1512)
at java.util.ArrayList.sort(ArrayList.java:1462)
at java.util.Collections.sort(Collections.java:175)
at cc.arduino.contributions.packages.ui.ContributionIndexTableModel.updateContributions(ContributionIndexTableModel.java:89)
at cc.arduino.contributions.packages.ui.ContributionIndexTableModel.updateIndexFilter(ContributionIndexTableModel.java:58)
at cc.arduino.contributions.ui.InstallerJDialog.updateIndexFilter(InstallerJDialog.java:293)
at cc.arduino.contributions.ui.InstallerJDialog$1.onFilter(InstallerJDialog.java:133)
at cc.arduino.contributions.ui.FilterJTextField.applyFilter(FilterJTextField.java:113)
at cc.arduino.contributions.ui.FilterJTextField.lambda$new$0(FilterJTextField.java:53)
at javax.swing.Timer.fireActionPerformed(Timer.java:313)
at javax.swing.Timer$DoPostEvent.run(Timer.java:245)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109)
at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:190)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:235)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:233)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:233)
at java.awt.Dialog.show(Dialog.java:1084)
at java.awt.Component.show(Component.java:1671)
at java.awt.Component.setVisible(Component.java:1623)
at java.awt.Window.setVisible(Window.java:1014)
at java.awt.Dialog.setVisible(Dialog.java:1005)
at processing.app.Base.openBoardsManager(Base.java:1423)
at processing.app.Base$10.actionPerformed(Base.java:1451)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:842)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:886)
at java.awt.Component.processMouseEvent(Component.java:6539)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6304)
at java.awt.Container.processEvent(Container.java:2239)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2297)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476)
at java.awt.Container.dispatchEventImpl(Container.java:2283)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
at java.awt.EventQueue$4.run(EventQueue.java:733)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
WARNING: Error loading hardware folder C:\Users\jgoodall\Documents\Arduino\hardware\esp8266com
No valid hardware definitions found in folder esp8266com.
I see these warnings, but my interpretation is that they are purely coincidental. I don't think they should cause any problem for the download, but that C:\Users\jgoodall\Documents\Arduino\hardware\esp8266com folder is also not doing you any good so you might as well delete it. Then we can be sure it's not causing problems.
Unfortunately, I don't have a clear interpretation of the more significant parts of that output. I'll go ahead and try to put the blame on my standard bugbear when I have no clue what the problem is:
This sort of error could be caused by your antivirus software. Try TEMPORARILY disabling your antivirus for a single compilation to see if the problem goes away, then turn the antivirus back on.
If the problem doesn't occur with the antivirus off you will need to adjust the settings of your antivirus to put the appropriate file, folder, or process on the "allow list" so it doesn't interfere with compilation.
Please be cautious about working without an antivirus. This is only about temporarily disabling it for a quick test. If you don't feel comfortable doing that, fine. You can try going straight to configuring the antivirus to not interfere with the Arduino software.
Turns out to be a deeper issue on our corporate firewall. As a quick workaround, we installed it off the domain network and it downloads via board manager without issue.
I'm glad to hear you identified the problem and were able to find a workaround. Thanks for taking the time to post an update with your findings. Enjoy!
I am having just same problem. My PC is also under my corporate firewall. I hopefully would like to use Arduino IDE under my corporate firewall. Could you kindly tell me what was your deeper issue with your coorporate firewall? If problems are identified, I am going to talk with my company's IT team.