Jump to content


Photo
- - - - -

Plugin Catalog Not Allowing Downloads

plugin theme server not working wmc catalog

  • Please log in to reply
59 replies to this topic

#21 throgmorton OFFLINE  

throgmorton

    Advanced Member

  • Members
  • 282 posts
  • Local time: 10:13 AM

Posted 18 January 2019 - 12:46 PM

The reason @ebr is asking to check with stable release is simply to determine if it was something that got broken along the way.

If anything when I get home tonight I will download and install the stable release and do some tests


Sent from my iPhone using Tapatalk

#22 throgmorton OFFLINE  

throgmorton

    Advanced Member

  • Members
  • 282 posts
  • Local time: 10:13 AM

Posted 18 January 2019 - 06:42 PM

So I downloaded and reverted back to 307 but still no dice...

 

The logger seems to suggest that the plugin is installing..

2019-01-18 17:21:37.1528,Info,,Installing plugin from https://embydata.com/admin/service/packageFiles/Centrality.dll_4.0.0.6.exe to C:\ProgramData\MediaBrowser-Classic\Plugins\Centrality.dll,30,Worker thread for Common

I also checked if I could download from the provided URL and it wasn't an issue.

 

So it leads me to this part of the code which is for some reason not working. It should enter the if statement and does seem to create the target file which is why the file is at 0 bytes but doesn't seem to want to download with the Async call.  There doesn't seem to be a try-throw statement on the Async call but maybe its throwing some sort of error?

      public void InstallPlugin(string sourcePath, string targetName,
                MediaBrowser.Library.Network.WebDownload.PluginInstallUpdateCB updateCB,
                MediaBrowser.Library.Network.WebDownload.PluginInstallFinishCB doneCB,
                MediaBrowser.Library.Network.WebDownload.PluginInstallErrorCB errorCB) {
            string target = Path.Combine(ApplicationPaths.AppPluginPath, targetName);

            Logger.ReportInfo("Installing plugin from {0} to {1}", sourcePath, target);

            if (sourcePath.ToLower().StartsWith("http")) {
                // Initialise Async Web Request
                var BUFFER_SIZE = 1024;
                var fileURI = new Uri(sourcePath);

                var request = WebRequest.Create(fileURI);
                var requestState = new Network.WebDownload.State(BUFFER_SIZE, target);
                requestState.request = request;
                requestState.fileURI = fileURI;
                requestState.progCB = updateCB;
                requestState.doneCB = doneCB;
                requestState.errorCB = errorCB;

                var result = (IAsyncResult)request.BeginGetResponse(new AsyncCallback(ResponseCallback), requestState);
            }
            else {
                File.Copy(sourcePath, target, true);
                InitialisePlugin(target);
            }

            // Moved code to InitialisePlugin()
            //Function needs to be called at end of Async dl process as well
        }



#23 ebr ONLINE  

ebr

    Chief Bottle Washer

  • Administrators
  • 47685 posts
  • Local time: 10:13 AM

Posted 18 January 2019 - 06:55 PM

Yeah, I'm at a bit of a loss here as well.

 

I also tried a direct download which worked but, for some reason, the async call is just never returning it appears.  @bigjohn are we positive that we haven't created a certificate problem or anything?



#24 bigjohn OFFLINE  

bigjohn

    Edge Case

  • Administrators
  • 972 posts
  • Local time: 09:13 AM
  • LocationArkansas, USA

Posted 18 January 2019 - 07:02 PM

@ebr nothing has changed with any certificates since December 9. Did this problem just start within the last few days?



#25 throgmorton OFFLINE  

throgmorton

    Advanced Member

  • Members
  • 282 posts
  • Local time: 10:13 AM

Posted 18 January 2019 - 07:10 PM

@ebr nothing has changed with any certificates since December 9. Did this problem just start within the last few days?

 

I think that's impossible to tell, it was just noticed recently, but it could have been a problem for a while...



#26 tmparsons1975 OFFLINE  

tmparsons1975

    Newbie

  • Members
  • 1 posts
  • Local time: 10:13 AM

Posted 20 January 2019 - 03:48 PM

Good Afternoon!  I too am having this issue.  No plugins will download.  Is there anywhere that I could find GameBrowser-Classic.dll to drop that in the plugins folder manually?  Thanks in advance for the help!



#27 throgmorton OFFLINE  

throgmorton

    Advanced Member

  • Members
  • 282 posts
  • Local time: 10:13 AM

Posted 20 January 2019 - 04:00 PM

Good Afternoon!  I too am having this issue.  No plugins will download.  Is there anywhere that I could find GameBrowser-Classic.dll to drop that in the plugins folder manually?  Thanks in advance for the help!

 

I added the file to my dropbox location (posted earlier in this thread)



#28 throgmorton OFFLINE  

throgmorton

    Advanced Member

  • Members
  • 282 posts
  • Local time: 10:13 AM

Posted 20 January 2019 - 11:27 PM

@ebr I actually managed to download and get the WMC source compiling on my machine so I was able to run it in debug mode and attach the visual studio debugger and found the issue.

 

The problem is in Kernel.cs in the following function:

        /// <summary>
        /// Main response callback, invoked once we have first Response packet from
        /// server.  This is where we initiate the actual file transfer, reading from
        /// a stream.
        /// </summary>
        /// <param name="asyncResult"></param>
        private void ResponseCallback(IAsyncResult asyncResult) {
            Network.WebDownload.State requestState = ((Network.WebDownload.State)(asyncResult.AsyncState));

            try {
                WebRequest req = requestState.request;
                
                // HTTP 
                if (requestState.fileURI.Scheme == Uri.UriSchemeHttp) {
                    HttpWebResponse resp = ((HttpWebResponse)(req.EndGetResponse(asyncResult)));
                    requestState.response = resp;
                    requestState.totalBytes = requestState.response.ContentLength;
                }
                else {
                    throw new ApplicationException("Unexpected URI");
                }

                // Set up a stream, for reading response data into it
                Stream responseStream = requestState.response.GetResponseStream();
                requestState.streamResponse = responseStream;

                // Begin reading contents of the response data
                IAsyncResult ar = responseStream.BeginRead(requestState.bufferRead, 0, requestState.bufferRead.Length, new AsyncCallback(ReadCallback), requestState);

                return;
            }
            catch (WebException ex) {
                //Callback to GUI to report an error has occured.
                if (requestState.errorCB != null) {
                    requestState.errorCB(ex);
                }
            }
        }

Basically the problem is the IF statement as your checking against HTTP when you should be check against HTTPS,

 

So modifying this if statement to:

if (requestState.fileURI.Scheme == Uri.UriSchemeHttps)

Fixes the problem and I was able to download again from the catalog.  I was testing in 3.0.307 but I'm sure this should fix all future versions.



#29 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 140578 posts
  • Local time: 10:13 AM

Posted 21 January 2019 - 01:02 AM

Great, thanks for doing that !



#30 ebr ONLINE  

ebr

    Chief Bottle Washer

  • Administrators
  • 47685 posts
  • Local time: 10:13 AM

Posted 21 January 2019 - 11:51 AM

Yeah, thanks, Throg for the investigation.  Something must've changed in the way these responses are coming back from our server.

 

I guess, more properly, we should check for either type (http || https).



#31 throgmorton OFFLINE  

throgmorton

    Advanced Member

  • Members
  • 282 posts
  • Local time: 10:13 AM

Posted 21 January 2019 - 01:32 PM

Yeah, thanks, Throg for the investigation.  Something must've changed in the way these responses are coming back from our server.

 

I guess, more properly, we should check for either type (http || https).

 

No problem, anything I can do to help as I know you guys are busy tackling other issues.

 

I think you could also use .StartsWith("http") to catch both as I've seen you guys do that elsewhere in the code.



#32 ebr ONLINE  

ebr

    Chief Bottle Washer

  • Administrators
  • 47685 posts
  • Local time: 10:13 AM

Posted 21 January 2019 - 02:51 PM

Thanks very much.  I think .317 should solve all these recent issues with 4.x of the server.



#33 pju OFFLINE  

pju

    Advanced Member

  • Members
  • 115 posts
  • Local time: 04:13 PM

Posted 30 January 2019 - 12:10 PM

Thanks very much.  I think .317 should solve all these recent issues with 4.x of the server.

May I ask if .317 is/will be compatible with the 3.5.3 Emby Server? And what is the timeframe?

I'm in no hurry upgrading Emby Server as long as the /People folder question still is under consideration.



#34 ebr ONLINE  

ebr

    Chief Bottle Washer

  • Administrators
  • 47685 posts
  • Local time: 10:13 AM

Posted 30 January 2019 - 12:22 PM

May I ask if .317 is/will be compatible with the 3.5.3 Emby Server? And what is the timeframe?

I'm in no hurry upgrading Emby Server as long as the /People folder question still is under consideration.

 

It should be compatible now but some things may not work exactly like they have.  For instance, the legacy browsing option is gone.

 

If you are staying on 3.5.3 and EMC is working for you, I wouldn't update it.



#35 pju OFFLINE  

pju

    Advanced Member

  • Members
  • 115 posts
  • Local time: 04:13 PM

Posted 30 January 2019 - 02:29 PM

Thanks for the update. My problem is the plugin updates. Nagging me every time I start EMC

Sent from my Galaxy with Tapatalk

#36 throgmorton OFFLINE  

throgmorton

    Advanced Member

  • Members
  • 282 posts
  • Local time: 10:13 AM

Posted 30 January 2019 - 04:09 PM

Thanks for the update. My problem is the plugin updates. Nagging me every time I start EMC

Sent from my Galaxy with Tapatalk


You should be able to disable the checks for plugin updates in the configuration menu.

Also I'm running on Server 3.6 and haven't had an issue with EMC version 317. Although I never used any of those legacy options to begin with.


Sent from my iPhone using Tapatalk

#37 pju OFFLINE  

pju

    Advanced Member

  • Members
  • 115 posts
  • Local time: 04:13 PM

Posted 30 January 2019 - 05:59 PM

You should be able to disable the checks for plugin updates in the configuration menu.

Also I'm running on Server 3.6 and haven't had an issue with EMC version 317. Although I never used any of those legacy options to begin with.


Sent from my iPhone using Tapatalk

Sounds good that you have had no problems with 317, thanks.

Guess I'll make myself a decent backup and upgrade EMC tomorrow and see how it works out for me. Suppose 317 is the latest beta.

 

I have long time ago unchecked both automatic and silent update and I still get the popup. Wonder if the automatic check only is for EMC itself.



#38 pju OFFLINE  

pju

    Advanced Member

  • Members
  • 115 posts
  • Local time: 04:13 PM

Posted 31 January 2019 - 05:27 AM

It should be compatible now but some things may not work exactly like they have.  For instance, the legacy browsing option is gone.

 

If you are staying on 3.5.3 and EMC is working for you, I wouldn't update it.

 

Sorry, but did I miss something here …

Have installed 317 on my testserver (running 4.0.1.0) and it seems I can still browse in EMC the way I prefer (as far I can see from the forum, I'm saved because my libraries are mixed content). 

But, the same problem with the plugin catalog. Had the impression that it should be OK.



#39 ebr ONLINE  

ebr

    Chief Bottle Washer

  • Administrators
  • 47685 posts
  • Local time: 10:13 AM

Posted 31 January 2019 - 09:55 AM

But, the same problem with the plugin catalog. Had the impression that it should be OK.

 

What problem, exactly?

 

EMC log?



#40 throgmorton OFFLINE  

throgmorton

    Advanced Member

  • Members
  • 282 posts
  • Local time: 10:13 AM

Posted 31 January 2019 - 10:00 AM

I think that the plugins are nagging him that they have updates available


Sent from my iPhone using Tapatalk





Also tagged with one or more of these keywords: plugin, theme, server, not working, wmc, catalog

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users