• Login
Community
  • Login

Cannot load 32bit plugin even when 64bit versions of all are installed

Scheduled Pinned Locked Moved General Discussion
13 Posts 2 Posters 2.3k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D
    Daryl Titcomb
    last edited by Daryl Titcomb Nov 23, 2022, 5:21 PM Nov 23, 2022, 3:50 PM

    Hi there,

    we are just now looking at deploying v.8.4.7 company-wide and are struggling with plugin deployment. our current deployment script is bellow

    @echo off
    
    taskkill /F /IM notepad++.exe
    
    rm "C:\Program Files\Notepad++\*.VERSION"
    
    ::start the main notepad++ installer
    START /Wait "" "%CD%\npp.8.4.7.Installer.x64.exe" /S
    
    ::echo the version file to the np++ default install location
    ECHO.> "C:\Program Files\Notepad++\8.4.7.VERSION"
    
    ::Check for existing install of compareplus and remove if already installed
    if exist "C:\Program Files\Notepad++\Plugins\ComparePlus\" rmdir "C:\Program Files\Notepad++\Plugins\ComparePlus" /s /q
    ::install latest version of compareplus
    mkdir "C:\Program Files\Notepad++\Plugins\ComparePlus"
    robocopy "ComparePlus_cp_1.1.0_x64" "C:\Program Files\Notepad++\Plugins\ComparePlus" /COPYALL /E
    
    ::Check for existing install of XMLtools and remove if already installed
    if exist "C:\Program Files\Notepad++\Plugins\XMLTools\" rmdir "C:\Program Files\Notepad++\Plugins\XMLTools" /s /q
    ::install latest version of XMLtools
    mkdir "C:\Program Files\Notepad++\Plugins\XMLTools"
    robocopy "XMLTools-3.1.1.13-x64" "C:\Program Files\Notepad++\Plugins\XMLTools" /COPYALL /E
    

    this installs perfectly well however when the user next launches notepad++ they receive an error that the installed plugins cannot be loaded as they are 32 bit.

    Screenshot Notepad .png

    does anyone have any suggestions as to where to begin troubleshooting this?

    Regards
    Daryl

    EDIT: issue was resolved by modifying the robocopy calls in the above script to remove the /COPYALL switch which was incorrectly added and caused issues when deploying via intune. amended script bellow

    @echo off
    
    taskkill /F /IM notepad++.exe
    
    ::start the main notepad++ installer
    START /Wait "" "%CD%\npp.8.4.7.Installer.x64.exe" /S
    
    ::echo the version file to the np++ default install location
    ECHO.> "C:\Program Files\Notepad++\8.4.7.VERSION"
    
    ::Check for existing install of compareplus and remove if already installed
    if exist "C:\Program Files\Notepad++\Plugins\ComparePlus\" rmdir "C:\Program Files\Notepad++\Plugins\ComparePlus" /s /q
    ::install latest version of compareplus
    mkdir "C:\Program Files\Notepad++\Plugins\ComparePlus"
    robocopy "ComparePlus_cp_1.1.0_x64" "C:\Program Files\Notepad++\Plugins\ComparePlus" /E
    
    ::Check for existing install of XMLtools and remove if already installed
    if exist "C:\Program Files\Notepad++\Plugins\XMLTools\" rmdir "C:\Program Files\Notepad++\Plugins\XMLTools" /s /q
    ::install latest version of XMLtools
    mkdir "C:\Program Files\Notepad++\Plugins\XMLTools"
    robocopy "XMLTools-3.1.1.13-x64" "C:\Program Files\Notepad++\Plugins\XMLTools" /E
    
    A 1 Reply Last reply Nov 23, 2022, 3:52 PM Reply Quote 0
    • A
      Alan Kilborn @Daryl Titcomb
      last edited by Nov 23, 2022, 3:52 PM

      @Daryl-Titcomb

      Get the 64-bit version of the plugin.
      Period.

      D 1 Reply Last reply Nov 23, 2022, 3:54 PM Reply Quote 0
      • D
        Daryl Titcomb @Alan Kilborn
        last edited by Nov 23, 2022, 3:54 PM

        @Alan-Kilborn thank you for your assistance, these are the 64 bit versions of the plugins, that is why I created the post. they run fine on test instances when copied in manually, you can even see the paths they are copied from include x64 in the path.

        A 1 Reply Last reply Nov 23, 2022, 4:03 PM Reply Quote 0
        • A
          Alan Kilborn @Daryl Titcomb
          last edited by Alan Kilborn Nov 23, 2022, 4:03 PM Nov 23, 2022, 4:03 PM

          @Daryl-Titcomb

          Ah.

          Ok, so I tried creating a zero-length (intentionally “corrupt” dll) file:

          ...\plugins\ComparePlus\ComparePlus.dll

          And I got the same error message you received:

          d1d33683-95ea-438d-acf4-0fd4fa581019-image.png

          This is somewhat surprising (the error message being “… 32-bit …”), leading one down the wrong path…

          So, my new advice might be to look at possible corruption in the copied files.

          D 1 Reply Last reply Nov 23, 2022, 4:15 PM Reply Quote 1
          • D
            Daryl Titcomb @Alan Kilborn
            last edited by Nov 23, 2022, 4:15 PM

            @Alan-Kilborn the SHA-256 hashes of the files match which to me would indicate the issue isn’t with corrupt DLLs however it is good to know that corrupt DLLs could cause the issue.

            A 1 Reply Last reply Nov 23, 2022, 4:26 PM Reply Quote 1
            • A
              Alan Kilborn @Daryl Titcomb
              last edited by Alan Kilborn Nov 23, 2022, 4:32 PM Nov 23, 2022, 4:26 PM

              @Daryl-Titcomb

              I think quite possibly the “…32-bit…” error message might occur for ANY failure in loading the plugin DLL. So, even if the files are not corrupt, I suppose there could be permissions issues or other problems relating to the file system…?

              EDIT: Ok, I’d be wrong in that. :-) HERE ’s the code that loads a plugin. And HERE ’s where it sets your error message.

              D 2 Replies Last reply Nov 23, 2022, 4:36 PM Reply Quote 4
              • D
                Daryl Titcomb @Alan Kilborn
                last edited by Nov 23, 2022, 4:36 PM

                @Alan-Kilborn thank you, you seem to have hit the nail on the head, the subfolders created by the script are not correctly inheriting permissions from “C:\Program Files” and therefore <devicename>\Users didn’t have permission to execute the DLL, just modifying the script now to force inheritance on those folders and will update shortly once I have pushed a test deploy

                1 Reply Last reply Reply Quote 3
                • D
                  Daryl Titcomb @Alan Kilborn
                  last edited by Nov 23, 2022, 5:19 PM

                  @Alan-Kilborn

                  I can confirm that the issue was indeed with the permissions on the plugin folders, this was traced back to the robocopy command we were using being incorrect, thank you very much for all your help in this

                  Daryl

                  A 1 Reply Last reply Nov 23, 2022, 6:58 PM Reply Quote 2
                  • A
                    Alan Kilborn @Daryl Titcomb
                    last edited by Nov 23, 2022, 6:58 PM

                    @Daryl-Titcomb

                    Well, if you’re still around, if you had any more detail about exactly what was wrong, it might help drive a change to Notepad++ code to provide a more helpful error message if others encounter the same problem in the future.

                    D 1 Reply Last reply Nov 24, 2022, 11:35 AM Reply Quote 1
                    • D
                      Daryl Titcomb @Alan Kilborn
                      last edited by Nov 24, 2022, 11:35 AM

                      @Alan-Kilborn certainly, always happy to contribute where I can

                      the issue was caused by my malformed robocopy command which stripped execute permissions from the DLL, as you said above, notepad++ throws a “cannot use 32bit plugin” error any time it can’t access the DLL, so even though it was receiving a permissions failure, it was taking this as a malformed DLL and spitting out the erroneous error. when the error in the robocopy was rectified the issue disappeared. my solution would be to look at building a better error catch system that catches specific file errors and parses them into more appropriate error messages, perhaps:

                      Missing DLL
                      Permissions
                      Corrupt DLL
                      Wrong architecture DLL

                      although the technical implementation side of this is not something I would be able to help with much as c++ is not a language I have much experience with

                      A 1 Reply Last reply Nov 24, 2022, 11:59 AM Reply Quote 1
                      • A
                        Alan Kilborn @Daryl Titcomb
                        last edited by Nov 24, 2022, 11:59 AM

                        @Daryl-Titcomb said:

                        Missing DLL
                        Permissions
                        Corrupt DLL
                        Wrong architecture DLL

                        Yes, that’s where I was going as well…

                        @Daryl-Titcomb said:

                        although the technical implementation side of this is not something I would be able to help with

                        That’s fine, I was really just looking for the root of your problem, which you provided, so thank you.

                        From here, we can turn it over to the dev team for consideration.

                        A 1 Reply Last reply Nov 24, 2022, 12:12 PM Reply Quote 0
                        • A
                          Alan Kilborn @Alan Kilborn
                          last edited by Nov 24, 2022, 12:12 PM

                          I created an official N++ issue, HERE .

                          A 1 Reply Last reply Nov 25, 2022, 12:39 PM Reply Quote 2
                          • A
                            Alan Kilborn @Alan Kilborn
                            last edited by Nov 25, 2022, 12:39 PM

                            @Daryl-Titcomb

                            The misleading error message was resolved, see HERE ; however the improvement request for more specific error messages remains incomplete as of now.

                            1 Reply Last reply Reply Quote 1
                            • PeterJonesP PeterJones referenced this topic on Jan 19, 2023, 2:10 PM
                            • PeterJonesP PeterJones referenced this topic on Jan 19, 2023, 2:36 PM
                            1 out of 13
                            • First post
                              1/13
                              Last post
                            The Community of users of the Notepad++ text editor.
                            Powered by NodeBB | Contributors