GluuFederation / oxAuth

OAuth 2.0 server and client; OpenID Connect Provider (OP) & UMA Authorization Server (AS)
https://gluu.org/docs/ce
MIT License
421 stars 150 forks source link

Super Gluu script failed to load. #1902

Closed MohitMaliFtechiz closed 4 months ago

MohitMaliFtechiz commented 4 months ago

!!!Note Unless you are Gluu staff, please first review and open an issue on https://support.gluu.org before opening an issue here. Thanks!

Describe the issue

Super Gluu script failed to load.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Go to person authentication scripts
  2. Click on supergluu.
  3. enable supergluu script
  4. change acr to superlguu
  5. try to authenticate user via super gluu

Expected behavior

user must be authenticate

Actual behavior

super gluu script failed to load

Screenshots

If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context

oxauth_script.log

2024-04-30 09:35:33,648 INFO  [oxAuthScheduler_Worker-1] [org.gluu.service.PythonService$PythonLoggerOutputStream] (PythonService.java:243) - Casa. init. Initialized successfully
2024-04-30 09:35:33,744 ERROR [oxAuthScheduler_Worker-1] [org.gluu.service.PythonService] (PythonService.java:186) - Failed to load python file
org.python.core.PyException: ImportError: No module named notnoop
    at org.python.core.Py.ImportError(Py.java:327) ~[jython-standalone-2.7.3.jar:2.7.4a1-SNAPSHOT]
    at org.python.core.imp.import_logic(imp.java:1292) ~[jython-standalone-2.7.3.jar:2.7.4a1-SNAPSHOT]
    at org.python.core.imp.import_module_level(imp.java:1371) ~[jython-standalone-2.7.3.jar:2.7.4a1-SNAPSHOT]
    at org.python.core.imp.importName(imp.java:1544) ~[jython-standalone-2.7.3.jar:2.7.4a1-SNAPSHOT]
    at org.python.core.ImportFunction.__call__(__builtin__.java:1285) ~[jython-standalone-2.7.3.jar:2.7.4a1-SNAPSHOT]
    at org.python.core.PyObject.__call__(PyObject.java:433) ~[jython-standalone-2.7.3.jar:2.7.4a1-SNAPSHOT]
    at org.python.core.__builtin__.__import__(__builtin__.java:1232) ~[jython-standalone-2.7.3.jar:2.7.4a1-SNAPSHOT]
    at org.python.core.imp.importFromAs(imp.java:1636) ~[jython-standalone-2.7.3.jar:2.7.4a1-SNAPSHOT]
    at org.python.core.imp.importFrom(imp.java:1611) ~[jython-standalone-2.7.3.jar:2.7.4a1-SNAPSHOT]
    at org.python.pycode._pyx11.f$0(super_gluu.py:45) ~[?:?]
    at org.python.pycode._pyx11.call_function(super_gluu.py) ~[?:?]
    at org.python.core.PyTableCode.call(PyTableCode.java:173) ~[jython-standalone-2.7.3.jar:2.7.4a1-SNAPSHOT]
    at org.python.core.PyCode.call(PyCode.java:18) ~[jython-standalone-2.7.3.jar:2.7.4a1-SNAPSHOT]
    at org.python.core.Py.runCode(Py.java:1742) ~[jython-standalone-2.7.3.jar:2.7.4a1-SNAPSHOT]
    at org.python.util.PythonInterpreter.execfile(PythonInterpreter.java:297) ~[jython-standalone-2.7.3.jar:2.7.4a1-SNAPSHOT]
    at org.gluu.service.PythonService.loadPythonScript(PythonService.java:184) ~[oxcore-script-4.5.4.Final.jar:?]
    at org.gluu.service.PythonService$Proxy$_$$_WeldClientProxy.loadPythonScript(Unknown Source) ~[oxcore-script-4.5.4.Final.jar:?]
    at org.gluu.service.custom.script.CustomScriptManager.createExternalTypeFromStringWithPythonException(CustomScriptManager.java:417) ~[oxcore-script-4.5.4.Final.jar:?]
    at org.gluu.service.custom.script.CustomScriptManager$Proxy$_$$_WeldSubclass.createExternalTypeFromStringWithPythonException(Unknown Source) ~[oxcore-script-4.5.4.Final.jar:?]
    at org.gluu.service.custom.script.CustomScriptManager.createExternalType(CustomScriptManager.java:385) ~[oxcore-script-4.5.4.Final.jar:?]
    at org.gluu.service.custom.script.CustomScriptManager.reloadCustomScriptConfigurations(CustomScriptManager.java:293) ~[oxcore-script-4.5.4.Final.jar:?]
    at org.gluu.service.custom.script.CustomScriptManager.reloadImpl(CustomScriptManager.java:182) ~[oxcore-script-4.5.4.Final.jar:?]
    at org.gluu.service.custom.script.CustomScriptManager.reload(CustomScriptManager.java:152) ~[oxcore-script-4.5.4.Final.jar:?]
    at org.gluu.service.custom.script.CustomScriptManager.reloadTimerEvent(CustomScriptManager.java:128) ~[oxcore-script-4.5.4.Final.jar:?]
    at org.gluu.service.custom.script.CustomScriptManager$Proxy$_$$_WeldSubclass.reloadTimerEvent(Unknown Source) ~[oxcore-script-4.5.4.Final.jar:?]
    at jdk.internal.reflect.GeneratedMethodAccessor188.invoke(Unknown Source) ~[?:?]
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
    at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
    at org.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:95) ~[weld-core-impl-3.1.9.Final.jar:3.1.9.Final]
    at org.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:85) ~[weld-core-impl-3.1.9.Final.jar:3.1.9.Final]
    at org.jboss.weld.injection.MethodInvocationStrategy$SimpleMethodInvocationStrategy.invoke(MethodInvocationStrategy.java:168) ~[weld-core-impl-3.1.9.Final.jar:3.1.9.Final]
    at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:330) ~[weld-core-impl-3.1.9.Final.jar:3.1.9.Final]
    at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:308) ~[weld-core-impl-3.1.9.Final.jar:3.1.9.Final]
    at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:286) ~[weld-core-impl-3.1.9.Final.jar:3.1.9.Final]
    at javax.enterprise.inject.spi.ObserverMethod.notify(ObserverMethod.java:124) ~[jakarta.enterprise.cdi-api-2.0.2.jar:?]
    at org.jboss.weld.util.Observers.notify(Observers.java:166) ~[weld-core-impl-3.1.9.Final.jar:3.1.9.Final]
    at org.jboss.weld.event.ObserverNotifier.notifySyncObservers(ObserverNotifier.java:285) ~[weld-core-impl-3.1.9.Final.jar:3.1.9.Final]
    at org.jboss.weld.event.ObserverNotifier.notify(ObserverNotifier.java:273) ~[weld-core-impl-3.1.9.Final.jar:3.1.9.Final]
    at org.jboss.weld.event.ObserverNotifier.fireEvent(ObserverNotifier.java:177) ~[weld-core-impl-3.1.9.Final.jar:3.1.9.Final]
    at org.jboss.weld.event.ObserverNotifier.fireEvent(ObserverNotifier.java:159) ~[weld-core-impl-3.1.9.Final.jar:3.1.9.Final]
    at org.jboss.weld.manager.BeanManagerImpl.fireEvent(BeanManagerImpl.java:632) ~[weld-core-impl-3.1.9.Final.jar:3.1.9.Final]
    at org.jboss.weld.util.ForwardingBeanManager.fireEvent(ForwardingBeanManager.java:104) ~[weld-core-impl-3.1.9.Final.jar:3.1.9.Final]
    at org.gluu.service.timer.TimerJob.execute(TimerJob.java:37) ~[oxcore-timer-weld-4.5.4.Final.jar:?]
    at org.gluu.service.timer.JobExecutionDelegate.execute(JobExecutionDelegate.java:31) ~[oxcore-timer-weld-4.5.4.Final.jar:?]
    at org.quartz.core.JobRunShell.run(JobRunShell.java:202) ~[quartz-2.3.2.jar:?]
    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573) ~[quartz-2.3.2.jar:?]
2024-04-30 09:35:33,747 ERROR [oxAuthScheduler_Worker-1] [org.gluu.service.custom.script.CustomScriptManager] (CustomScriptManager.java:387) - Failed to prepare external type 'org.gluu.exception.PythonException: Failed to load python file 'java.io.ByteArrayInputStream@2334add1''
yurem commented 4 months ago

Fixed in https://github.com/GluuFederation/oxAuth/commit/ff72a9cf17021387734c1edbe4d9e572c525d7fb

In all existing deployments we need to remove in line 8 from com.notnoop.apns import APNS it's duplicate definition. Right one which handle missing library is at the end of import section

MohitMaliFtechiz commented 4 months ago

@yurem yes fix is tested and working thank you!