ubsicap / paratext_demo_plugins

Sample code to demonstrate how to create a Paratext plugin
2 stars 4 forks source link

Bug Issue with our plugin and the Interlinearizer #20

Closed GeoDirk closed 1 year ago

GeoDirk commented 1 year ago

Ran across this issue with our plugin and one of our clients. If an interlinearizer is part of the same Paratext load process as an interlinearizer, Paratext throws up this error:

interlinearizer_bug

and our plugin can't start the OWin Web Api environment.

Without an interlinearizer, we load up normally:

interlinearizer_removed

It doesn't always trigger the issue but seems to be dependent on the load order of the Paratext windows. But at least for me, if you add in an interlinearizer after our plugin has loaded, no issue. However, if you have an interlinearizer window open on load, and then add in our plugin, it usually triggers the error.

You can download our plugin installer from here temporarily to test against. https://drive.google.com/drive/folders/1x4-4vjZS4AM6HNehp6XX66TZP68Q68f5

Attached is my Paratext log file.

Note, because of outstanding issue #2, it is normal for our plugin to do a few internal error retries before actually launching the OWin Web API. You see that as the orange text in our plugin on the second image.

Can you guys drill down as to the Paratext reason why this is throwing up the error and if there is something on our end that we can modify our code to overcome this error, it would be obviously very helpful.

ParatextLog.log

jwickberg commented 1 year ago

The InterlinearForm uses a different plugin manager - we are trying to get a plugin created to access FieldWorks data.

As part of this, it also subscribes to AppDomain.CurrentDomain.AssemblyResolve

So, it probably means that the two subscriptions are interfering with each other. Not sure what the answer is immediately.

John

On Mon, Oct 31, 2022 at 2:57 PM GeoDirk @.***> wrote:

Ran across this issue with our plugin and one of our clients. If an interlinearizer is part of the same Paratext load process as an interlinearizer, Paratext throws up this error:

[image: interlinearizer_bug] https://user-images.githubusercontent.com/1356726/199084397-c5b4af11-3c2b-4f87-b1a0-547852c50ab1.png

and our plugin can't start the OWin Web Api environment.

Without an interlinearizer, we load up normally:

[image: interlinearizer_removed] https://user-images.githubusercontent.com/1356726/199084779-831e2842-e1d6-4142-b8a6-228e5e8fa564.png

It doesn't always trigger the issue but seems to be dependent on the load order of the Paratext windows. But at least for me, if you add in an interlinearizer after our plugin has loaded, no issue. However, if you have an interlinearizer window open on load, and then add in our plugin, it usually triggers the error.

You can download our plugin installer from here temporarily to test against. https://drive.google.com/drive/folders/1x4-4vjZS4AM6HNehp6XX66TZP68Q68f5

Attached is my Paratext log file.

Note, because of outstanding issue #2 https://github.com/ubsicap/paratext_demo_plugins/issues/2, it is normal for our plugin to do a few internal error retries before actually launching the OWin Web API. You see that as the orange text in our plugin on the second image.

Can you guys drill down as to the Paratext reason why this is throwing up the error and if there is something on our end that we can modify our code to overcome this error, it would be obviously very helpful.

ParatextLog.log https://github.com/ubsicap/paratext_demo_plugins/files/9904012/ParatextLog.log

— Reply to this email directly, view it on GitHub https://github.com/ubsicap/paratext_demo_plugins/issues/20, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANSZJWPD36UCAJQ66HIUL3WGAJCHANCNFSM6AAAAAARTL3FXQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

jwickberg commented 1 year ago

Looks like we should just catch any exceptions and return null if our code can't resolve the referenced assembly. That should allow other subscribers to get a chance.

I'll create a bug report for this.

GeoDirk commented 1 year ago

@jwickberg @FoolRunning Fantastic! Thanks for getting this fixed! Any timeline of when we'll see this rolled out?

FoolRunning commented 1 year ago

It should be in 9.3.103.8 when it gets released. It will hopefully go to our pre-release users within the next two weeks and later be pushed to all users.