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.
    • Daryl TitcombD
      Daryl Titcomb
      last edited by Daryl Titcomb

      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
      
      Alan KilbornA 1 Reply Last reply Reply Quote 0
      • Alan KilbornA
        Alan Kilborn @Daryl Titcomb
        last edited by

        @Daryl-Titcomb

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

        Daryl TitcombD 1 Reply Last reply Reply Quote 0
        • Daryl TitcombD
          Daryl Titcomb @Alan Kilborn
          last edited by

          @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.

          Alan KilbornA 1 Reply Last reply Reply Quote 0
          • Alan KilbornA
            Alan Kilborn @Daryl Titcomb
            last edited by Alan Kilborn

            @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.

            Daryl TitcombD 1 Reply Last reply Reply Quote 1
            • Daryl TitcombD
              Daryl Titcomb @Alan Kilborn
              last edited by

              @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.

              Alan KilbornA 1 Reply Last reply Reply Quote 1
              • Alan KilbornA
                Alan Kilborn @Daryl Titcomb
                last edited by Alan Kilborn

                @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.

                Daryl TitcombD 2 Replies Last reply Reply Quote 4
                • Daryl TitcombD
                  Daryl Titcomb @Alan Kilborn
                  last edited by

                  @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
                  • Daryl TitcombD
                    Daryl Titcomb @Alan Kilborn
                    last edited by

                    @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

                    Alan KilbornA 1 Reply Last reply Reply Quote 2
                    • Alan KilbornA
                      Alan Kilborn @Daryl Titcomb
                      last edited by

                      @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.

                      Daryl TitcombD 1 Reply Last reply Reply Quote 1
                      • Daryl TitcombD
                        Daryl Titcomb @Alan Kilborn
                        last edited by

                        @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

                        Alan KilbornA 1 Reply Last reply Reply Quote 1
                        • Alan KilbornA
                          Alan Kilborn @Daryl Titcomb
                          last edited by

                          @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.

                          Alan KilbornA 1 Reply Last reply Reply Quote 0
                          • Alan KilbornA
                            Alan Kilborn @Alan Kilborn
                            last edited by

                            I created an official N++ issue, HERE.

                            Alan KilbornA 1 Reply Last reply Reply Quote 2
                            • Alan KilbornA
                              Alan Kilborn @Alan Kilborn
                              last edited by

                              @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
                              • PeterJonesP PeterJones referenced this topic on
                              • First post
                                Last post
                              The Community of users of the Notepad++ text editor.
                              Powered by NodeBB | Contributors