问:
Mp4 player not working in webview with flutter
I'm trying to create a simple flutter app using webview to display Udemy course following this tutorial https://www.digitalocean.com/community/tutorials/flutter-webview

The app is working fine but the video doesn't appear

This is what I get from the log

```Launching lib\main.dart on SM A127F in debug mode...
Running Gradle task 'assembleDebug'...
√  Built build\app\outputs\flutter-apk\app-debug.apk.
Debug service listening on ws://127.0.0.1:56602/gHPXg4pWPuw=/ws
Syncing files to device SM A127F...
W/webview_exampl(10939): Entry not found
I/WebViewFactory(10939): Loading com.google.android.webview version 107.0.5304.141 (code 530414133)
W/webview_exampl(10939): Accessing hidden method Landroid/os/Trace;->isTagEnabled(J)Z (unsupported, reflection, allowed)
W/webview_exampl(10939): Accessing hidden method Landroid/os/Trace;->traceBegin(JLjava/lang/String;)V (unsupported, reflection, allowed)
W/webview_exampl(10939): Accessing hidden method Landroid/os/Trace;->traceEnd(J)V (unsupported, reflection, allowed)
W/webview_exampl(10939): Accessing hidden method Landroid/os/Trace;->asyncTraceBegin(JLjava/lang/String;I)V (unsupported, reflection, allowed)
W/webview_exampl(10939): Accessing hidden method Landroid/os/Trace;->asyncTraceEnd(JLjava/lang/String;I)V (unsupported, reflection, allowed)
I/cr_WVCFactoryProvider(10939): Loaded version=107.0.5304.141 minSdkVersion=29 isBundle=true multiprocess=true packageId=2
D/hw-ProcessState(10939): Binder ioctl to enable oneway spam detection failed: Invalid argument
I/cr_LibraryLoader(10939): Successfully loaded native library
I/cr_CachingUmaRecorder(10939): Flushed 9 samples from 9 histograms.
W/chromium(10939): [WARNING:dns_config_service_android.cc(115)] Failed to read DnsConfig.
D/CompatibilityChangeReporter(10939): Compat change id reported: 171228096; UID 10438; state: ENABLED
W/webview_exampl(10939): Accessing hidden method Landroid/media/AudioManager;->getOutputLatency(I)I (unsupported, reflection, allowed)
W/cr_media(10939): BLUETOOTH_CONNECT permission is missing.
W/cr_media(10939): registerBluetoothIntentsIfNeeded: Requires BLUETOOTH permission
I/PlatformViewsController(10939): Hosting view in view hierarchy for platform view: 0
D/OpenGLRenderer(10939): eglCreateWindowSurface
E/FrameEvents(10939): updateAcquireFence: Did not find frame.
I/Choreographer(10939): Skipped 82 frames!  The application may be doing too much work on its main thread.
D/ViewRootImpl@4504b5[MainActivity](10939): Creating frameDrawingCallback nextDrawUseBlastSync=false reportNextDraw=true hasBlurUpdates=false
D/ViewRootImpl@4504b5[MainActivity](10939): Creating frameCompleteCallback
W/chromium(10939): [WARNING:display_webview.cc(31)] WebView overlays are enabled!
E/FrameEvents(10939): updateAcquireFence: Did not find frame.
D/ViewRootImpl@4504b5[MainActivity](10939): Received frameDrawingCallback frameNum=1. Creating transactionCompleteCallback=false
I/SurfaceView@1614354(10939): uSP: rtp = Rect(0, 0 - 720, 1510) rtsw = 720 rtsh = 1510
I/SurfaceView@1614354(10939): onSSPAndSRT: pl = 0 pt = 0 sx = 1.0 sy = 1.0
I/SurfaceView@1614354(10939): aOrMT: uB = true t = android.view.SurfaceControl$Transaction@aa761b3 fN = 1 android.view.SurfaceView.access$500:124 android.view.SurfaceView$SurfaceViewPositionUpdateListener.positionChanged:1728 android.graphics.RenderNode$CompositePositionUpdateListener.positionChanged:319
I/SurfaceView@1614354(10939): aOrMT: vR.mWNT, vR = ViewRootImpl@4504b5[MainActivity]
I/ViewRootImpl@4504b5[MainActivity](10939): mWNT: t = android.view.SurfaceControl$Transaction@aa761b3 fN = 1 android.view.SurfaceView.applyOrMergeTransaction:1628 android.view.SurfaceView.access$500:124 android.view.SurfaceView$SurfaceViewPositionUpdateListener.positionChanged:1728
I/ViewRootImpl@4504b5[MainActivity](10939): mWNT: merge t to BBQ
D/ViewRootImpl@4504b5[MainActivity](10939): Received frameCompleteCallback  lastAcquiredFrameNum=1 lastAttemptedDrawFrameNum=1
I/OpenGLRenderer(10939): Davey! duration=1709ms; Flags=1, FrameTimelineVsyncId=8231340, IntendedVsync=182355268658186, Vsync=182356635324798, InputEventId=0, HandleInputStart=182356651941837, AnimationStart=182356651946606, PerformTraversalsStart=182356660920529, DrawStart=182356683801490, FrameDeadline=182355285324852, FrameInterval=182356651700875, FrameStartTime=16666666, SyncQueued=182356698667221, SyncStart=182356782952337, IssueDrawCommandsStart=182356783246490, SwapBuffers=182357056454798, FrameCompleted=182357062442183, DequeueBufferDuration=3513231, QueueBufferDuration=3138616, GpuCompleted=182357060938836, SwapBuffersCompleted=182357062442183, DisplayPresentTime=0,
I/ViewRootImpl@4504b5[MainActivity](10939): [DP] pdf(0) 1 android.view.ViewRootImpl.lambda$addFrameCompleteCallbackIfNeeded$3$ViewRootImpl:4995 android.view.ViewRootImpl$$ExternalSyntheticLambda16.run:6 android.os.Handler.handleCallback:938
I/ViewRootImpl@4504b5[MainActivity](10939): [DP] rdf()
D/ViewRootImpl@4504b5[MainActivity](10939): reportDrawFinished (fn: -1)
E/FrameEvents(10939): updateAcquireFence: Did not find frame.
I/ViewRootImpl@4504b5[MainActivity](10939): MSG_WINDOW_FOCUS_CHANGED 1 1
D/InputMethodManager(10939): startInputInner - Id : 0
I/InputMethodManager(10939): startInputInner - mService.startInputOrWindowGainedFocus
D/InputMethodManager(10939): startInputInner - Id : 0
E/FrameEvents(10939): updateAcquireFence: Did not find frame.
I/chromium(10939): [INFO:CONSOLE(2)] "Uncaught (in promise) Error: Request failed with status code 403", source: https://udemy.com/staticx/udemy/js/webpack/entry-udlite-baseline-vendor.9ce19f0ae4e37916d282.js (2)
E/FrameEvents(10939): updateAcquireFence: Did not find frame.
I/webview_exampl(10939): Compiler allocated 4546KB to compile void android.view.ViewRootImpl.performTraversals()
E/FrameEvents(10939): updateAcquireFence: Did not find frame.
D/InputMethodManager(10939): startInputInner - Id : 0
I/InputMethodManager(10939): startInputInner - mService.startInputOrWindowGainedFocus
E/FrameEvents(10939): updateAcquireFence: Did not find frame.
I/ViewRootImpl@4504b5[MainActivity](10939): handleAppVisibility mAppVisible=true visible=false
I/ViewRootImpl@4504b5[MainActivity](10939): stopped(true) old=false
I/SurfaceView@1614354(10939): 116162559 wPL, frameNr = 0
I/SurfaceView@1614354(10939): aOrMT: uB = true t = android.view.SurfaceControl$Transaction@fec61cc fN = 0 android.view.SurfaceView.access$500:124 android.view.SurfaceView$SurfaceViewPositionUpdateListener.positionLost:1785 android.graphics.RenderNode$CompositePositionUpdateListener.positionLost:326
I/SurfaceView@1614354(10939): aOrMT: vR.mWNT, vR = ViewRootImpl@4504b5[MainActivity]
I/ViewRootImpl@4504b5[MainActivity](10939): mWNT: t = android.view.SurfaceControl$Transaction@fec61cc fN = 0 android.view.SurfaceView.applyOrMergeTransaction:1628 android.view.SurfaceView.access$500:124 android.view.SurfaceView$SurfaceViewPositionUpdateListener.positionLost:1785
I/ViewRootImpl@4504b5[MainActivity](10939): mWNT: merge t to BBQ
I/SurfaceView@1614354(10939): windowStopped(true) false io.flutter.embedding.android.FlutterSurfaceView{1614354 V.E...... ........ 0,0-720,1510} of ViewRootImpl@4504b5[MainActivity]
I/SurfaceView@1614354(10939): pST: mTmpTransaction.apply, mTmpTransaction = android.view.SurfaceControl$Transaction@e4542aa
I/SurfaceView@1614354(10939): surfaceDestroyed callback.size 1 #1 io.flutter.embedding.android.FlutterSurfaceView{1614354 V.E...... ........ 0,0-720,1510}
I/SurfaceView@1614354(10939): updateSurface: mVisible = false mSurface.isValid() = true
I/SurfaceView@1614354(10939): remove() io.flutter.embedding.android.FlutterSurfaceView{1614354 V.E...... ........ 0,0-720,1510} Surface(name=SurfaceView - com.example.flutter_webview_example/com.example.flutter_webview_example.MainActivity@1614354@0)/@0xd39fc15
I/SurfaceView@1614354(10939): onWindowVisibilityChanged(8) false io.flutter.embedding.android.FlutterSurfaceView{1614354 V.E...... ........ 0,0-720,1510} of ViewRootImpl@4504b5[MainActivity]
D/SurfaceView@1614354(10939): updateSurface: surface is not valid
D/OpenGLRenderer(10939): setSurface called with nullptr
D/OpenGLRenderer(10939): setSurface() destroyed EGLSurface
D/OpenGLRenderer(10939): destroyEglSurface
I/ViewRootImpl@4504b5[MainActivity](10939): Relayout returned: old=(0,0,720,1600) new=(0,0,720,1600) req=(720,1600)8 dur=19 res=0x5 s={false 0} ch=false fn=-1
D/SurfaceView@1614354(10939): updateSurface: surface is not valid
I/ViewRootImpl@4504b5[MainActivity](10939): MSG_WINDOW_FOCUS_CHANGED 0 1
I/ViewRootImpl@4504b5[MainActivity](10939): handleAppVisibility mAppVisible=false visible=true
I/SurfaceView@1614354(10939): onWindowVisibilityChanged(4) false io.flutter.embedding.android.FlutterSurfaceView{1614354 V.E...... ........ 0,0-720,1510} of ViewRootImpl@4504b5[MainActivity]
D/SurfaceView@1614354(10939): updateSurface: surface is not valid
D/OpenGLRenderer(10939): setSurface called with nullptr
I/ViewRootImpl@4504b5[MainActivity](10939): Relayout returned: old=(0,0,720,1600) new=(0,0,720,1600) req=(720,1600)4 dur=24 res=0x1 s={false 0} ch=false fn=-1
D/SurfaceView@1614354(10939): updateSurface: surface is not valid
I/ViewRootImpl@4504b5[MainActivity](10939): stopped(false) old=true
I/ViewRootImpl@4504b5[MainActivity](10939): stopped(false) old=false
I/DecorView(10939): notifyKeepScreenOnChanged: keepScreenOn=false
I/SurfaceView@1614354(10939): onWindowVisibilityChanged(0) false io.flutter.embedding.android.FlutterSurfaceView{1614354 V.E...... ........ 0,0-720,1510} of ViewRootImpl@4504b5[MainActivity]
D/SurfaceView@1614354(10939): updateSurface: surface is not valid
D/OpenGLRenderer(10939): setSurface called with nullptr
I/ViewRootImpl@4504b5[MainActivity](10939): Relayout returned: old=(0,0,720,1600) new=(0,0,720,1600) req=(720,1600)0 dur=20 res=0x7 s={true -5476376626480246784} ch=true fn=-1
D/OpenGLRenderer(10939): eglCreateWindowSurface
I/SurfaceView@1614354(10939): windowStopped(false) true io.flutter.embedding.android.FlutterSurfaceView{1614354 V.E...... ........ 0,0-720,1510} of ViewRootImpl@4504b5[MainActivity]
I/SurfaceView@1614354(10939): pST: sr = Rect(0, 0 - 720, 1510) sw = 720 sh = 1510
I/SurfaceView@1614354(10939): onSSPAndSRT: pl = 0 pt = 0 sx = 1.0 sy = 1.0
I/SurfaceView@1614354(10939): pST: mTmpTransaction.apply, mTmpTransaction = android.view.SurfaceControl$Transaction@e4542aa
I/SurfaceView@1614354(10939): updateSurface: mVisible = true mSurface.isValid() = true
I/SurfaceView@1614354(10939): updateSurface: mSurfaceCreated = false surfaceChanged = true visibleChanged = true
I/SurfaceView@1614354(10939): surfaceCreated 1 #1 io.flutter.embedding.android.FlutterSurfaceView{1614354 V.E...... ........ 0,0-720,1510}
I/SurfaceView@1614354(10939): surfaceChanged (720,1510) 1 #1 io.flutter.embedding.android.FlutterSurfaceView{1614354 V.E...... ........ 0,0-720,1510}
I/ViewRootImpl@4504b5[MainActivity](10939): [DP] dp(1) 1 android.view.SurfaceView.updateSurface:1375 android.view.SurfaceView.setWindowStopped:383 android.view.SurfaceView.surfaceCreated:2051
I/ViewRootImpl@4504b5[MainActivity](10939): [DP] pdf(0) 1 android.view.SurfaceView.notifyDrawFinished:599 android.view.SurfaceView.performDrawFinished:586 android.view.SurfaceView.$r8$lambda$st27mCkd9jfJkTrN_P3qIGKX6NY:0
I/ViewRootImpl@4504b5[MainActivity](10939): [DP] rdf()
D/ViewRootImpl@4504b5[MainActivity](10939): reportDrawFinished (fn: -1)
I/ViewRootImpl@4504b5[MainActivity](10939): [DP] dp(1) 1 android.view.ViewRootImpl.reportNextDraw:11420 android.view.ViewRootImpl.performTraversals:4193 android.view.ViewRootImpl.doTraversal:2919
D/ViewRootImpl@4504b5[MainActivity](10939): Creating frameDrawingCallback nextDrawUseBlastSync=false reportNextDraw=true hasBlurUpdates=false
D/ViewRootImpl@4504b5[MainActivity](10939): Creating frameCompleteCallback
E/FrameEvents(10939): updateAcquireFence: Did not find frame.
I/SurfaceView@1614354(10939): uSP: rtp = Rect(0, 0 - 720, 1510) rtsw = 720 rtsh = 1510
I/SurfaceView@1614354(10939): onSSPAndSRT: pl = 0 pt = 0 sx = 1.0 sy = 1.0
I/SurfaceView@1614354(10939): aOrMT: uB = true t = android.view.SurfaceControl$Transaction@d4e98cd fN = 1 android.view.SurfaceView.access$500:124 android.view.SurfaceView$SurfaceViewPositionUpdateListener.positionChanged:1728 android.graphics.RenderNode$CompositePositionUpdateListener.positionChanged:319
I/SurfaceView@1614354(10939): aOrMT: vR.mWNT, vR = ViewRootImpl@4504b5[MainActivity]
I/ViewRootImpl@4504b5[MainActivity](10939): mWNT: t = android.view.SurfaceControl$Transaction@d4e98cd fN = 1 android.view.SurfaceView.applyOrMergeTransaction:1628 android.view.SurfaceView.access$500:124 android.view.SurfaceView$SurfaceViewPositionUpdateListener.positionChanged:1728
I/ViewRootImpl@4504b5[MainActivity](10939): mWNT: merge t to BBQ
D/ViewRootImpl@4504b5[MainActivity](10939): Received frameDrawingCallback frameNum=1. Creating transactionCompleteCallback=false
D/ViewRootImpl@4504b5[MainActivity](10939): Received frameCompleteCallback  lastAcquiredFrameNum=1 lastAttemptedDrawFrameNum=1
I/ViewRootImpl@4504b5[MainActivity](10939): [DP] pdf(0) 1 android.view.ViewRootImpl.lambda$addFrameCompleteCallbackIfNeeded$3$ViewRootImpl:4995 android.view.ViewRootImpl$$ExternalSyntheticLambda16.run:6 android.os.Handler.handleCallback:938
I/ViewRootImpl@4504b5[MainActivity](10939): [DP] rdf()
D/ViewRootImpl@4504b5[MainActivity](10939): reportDrawFinished (fn: -1)
E/FrameEvents(10939): updateAcquireFence: Did not find frame.
D/InsetsSourceConsumer(10939): ensureControlAlpha: for ITYPE_NAVIGATION_BAR on com.example.flutter_webview_example/com.example.flutter_webview_example.MainActivity
D/InsetsSourceConsumer(10939): ensureControlAlpha: for ITYPE_STATUS_BAR on com.example.flutter_webview_example/com.example.flutter_webview_example.MainActivity
I/ViewRootImpl@4504b5[MainActivity](10939): MSG_WINDOW_FOCUS_CHANGED 1 1
D/InputMethodManager(10939): startInputInner - Id : 0
I/InputMethodManager(10939): startInputInner - mService.startInputOrWindowGainedFocus
I/ViewRootImpl@4504b5[MainActivity](10939): ViewPostIme pointer 0
I/ViewRootImpl@4504b5[MainActivity](10939): ViewPostIme pointer 1
E/FrameEvents(10939): updateAcquireFence: Did not find frame.
D/InputMethodManager(10939): startInputInner - Id : 0
I/InputMethodManager(10939): startInputInner - mService.startInputOrWindowGainedFocus
I/IMM_LC  (10939): hsifw() - flags=0, caller=android.view.inputmethod.InputMethodManager.hideSoftInputFromWindow:1846 org.chromium.content.browser.input.ImeAdapterImpl.f:40 org.chromium.content.browser.input.ImeAdapterImpl.updateState:32 android.os.MessageQueue.nativePollOnce:-2 android.os.MessageQueue.next:335
I/IMM_LC  (10939): hideSoftInputFromWindow - mService.hideSoftInput
E/FrameEvents(10939): updateAcquireFence: Did not find frame.
I/IMM_LC  (10939): hsifw() - flags=0, caller=android.view.inputmethod.InputMethodManager.hideSoftInputFromWindow:1846 org.chromium.content.browser.input.ImeAdapterImpl.f:40 org.chromium.content.browser.input.ImeAdapterImpl.updateState:32 android.os.MessageQueue.nativePollOnce:-2 android.os.MessageQueue.next:335
I/IMM_LC  (10939): hideSoftInputFromWindow - mService.hideSoftInput
W/chromium(10939): [WARNING:spdy_session.cc(3502)] Received HEADERS for invalid stream 35
E/FrameEvents(10939): updateAcquireFence: Did not find frame.
I/chromium(10939): [INFO:CONSOLE(2)] "VIDEOJS: WARN: videojs.HlsSourceHandler is deprecated. Use videojs.VhsSourceHandler instead.", source: https://udemy.com/staticx/udemy/js/webpack/vendor-videojs.b650644c56cf8646f485.js (2)
I/DrmHal  (10939): found instance=clearkey version=android.hardware.drm@1.4::IDrmFactory
I/DrmHal  (10939): found instance=widevine version=android.hardware.drm@1.4::IDrmFactory
W/AudioCapabilities(10939): Unsupported mime audio/x-ima
W/AudioCapabilities(10939): Unsupported mime audio/mpeg-L1
W/AudioCapabilities(10939): Unsupported mime audio/mpeg-L2
W/VideoCapabilities(10939): Unsupported mime video/wvc1
W/VideoCapabilities(10939): Unsupported mime video/x-ms-wmv
W/VideoCapabilities(10939): Unsupported mime video/wvc1
D/InputTransport(10939): Input channel destroyed: 'ClientS', fd=238
D/InputTransport(10939): Input channel destroyed: 'ClientS', fd=260
D/InputTransport(10939): Input channel destroyed: 'ClientS', fd=180
E/FrameEvents(10939): updateAcquireFence: Did not find frame.
I/chromium(10939): [INFO:CONSOLE(2)] "VIDEOJS: WARN: videojs.HlsSourceHandler is deprecated. Use videojs.VhsSourceHandler instead.", source: https://udemy.com/staticx/udemy/js/webpack/vendor-videojs.b650644c56cf8646f485.js (2)
E/FrameEvents(10939): updateAcquireFence: Did not find frame.
W/chromium(10939): [WARNING:spdy_session.cc(3234)] Received RST for invalid stream7
E/FrameEvents(10939): updateAcquireFence: Did not find frame.
E/cr_MediaCodecUtil(10939): Decoder for type video/x-vnd.on2.vp9 is not supported on this device [requireSoftware=false, requireHardware=true].
E/FrameEvents(10939): updateAcquireFence: Did not find frame.
E/cr_MediaCodecUtil(10939): Decoder for type video/av01 is not supported on this device [requireSoftware=false, requireHardware=true].
E/FrameEvents(10939): updateAcquireFence: Did not find frame.
V/MediaPlayer-JNI(10939): native_setup
V/MediaPlayerNative(10939): constructor
V/MediaPlayerNative(10939): setListener
V/MediaPlayer-JNI(10939): setParameter: key 1400
V/MediaPlayerNative(10939): MediaPlayer::setParameter(1400)
V/MediaPlayer-JNI(10939): set_session_id(): 15345
V/MediaPlayerNative(10939): MediaPlayer::setAudioSessionId(15345)
V/MediaPlayer-JNI(10939): setDataSourceFD: fd 133
V/MediaPlayerNative(10939): setDataSource(133, 110063172, 58)
V/MediaPlayerNative(10939): setVideoSurfaceTexture
V/MediaPlayerNative(10939): prepare
V/MediaPlayerNative(10939): message received msg=200, ext1=10973, ext2=0
W/MediaPlayerNative(10939): info/warning (10973, 0)
V/MediaPlayerNative(10939): message received msg=1, ext1=0, ext2=0
V/MediaPlayerNative(10939): MediaPlayer::notify() prepared
V/MediaPlayerNative(10939): signal application thread
V/MediaPlayerNative(10939): prepare complete - status=0
V/MediaPlayerNative(10939): invoke 76
V/MediaPlayer-JNI(10939): native_setup
V/MediaPlayerNative(10939): constructor
V/MediaPlayerNative(10939): setListener
V/MediaPlayer-JNI(10939): setVolume: left 0.000000  right 0.000000
V/MediaPlayerNative(10939): MediaPlayer::setVolume(0.000000, 0.000000)
V/MediaHTTPService(10939): MediaHTTPService(android.media.MediaHTTPService@8743ff0): Cookies: null
V/MediaPlayerNative(10939): setVideoSurfaceTexture
V/MediaPlayerNative(10939): prepareAsync
V/MediaPlayerNative(10939): setVideoSurfaceTexture
V/MediaHTTPService(10939): makeHTTPConnection: CookieManager created: java.net.CookieManager@89a8969
V/MediaHTTPService(10939): makeHTTPConnection(android.media.MediaHTTPService@8743ff0): cookieHandler: java.net.CookieManager@89a8969 Cookies: null
I/DecorView(10939): notifyKeepScreenOnChanged: keepScreenOn=true
I/MediaHTTPConnection(10939): setReadTimeout and setConnectTimeout with 8000ms
I/ViewRootImpl@4504b5[MainActivity](10939): Relayout returned: old=(0,0,720,1600) new=(0,0,720,1600) req=(720,1600)0 dur=15 res=0x1 s={true -5476376626480246784} ch=false fn=191
E/FrameEvents(10939): updateAcquireFence: Did not find frame.
V/MediaPlayer-JNI(10939): setVolume: left 1.000000  right 1.000000
V/MediaPlayerNative(10939): MediaPlayer::setVolume(1.000000, 1.000000)
V/MediaPlayerNative(10939): invoke 76
E/FrameEvents(10939): updateAcquireFence: Did not find frame.
I/MediaHTTPConnection(10939): response code = 200
I/MediaHTTPConnection(10939): setReadTimeout and setConnectTimeout with 8000ms
I/MediaHTTPConnection(10939): response code = 200
I/MediaHTTPConnection(10939): setReadTimeout and setConnectTimeout with 8000ms
V/MediaPlayer-JNI(10939): native_finalize
V/MediaPlayer-JNI(10939): release
V/MediaPlayer-JNI(10939): native_finalize
V/MediaPlayer-JNI(10939): release
V/MediaPlayer-JNI(10939): native_finalize
V/MediaPlayer-JNI(10939): release
I/MediaHTTPConnection(10939): response code = 404
E/MediaHTTPConnection(10939): java.io.IOException
E/MediaHTTPConnection(10939):   at android.media.MediaHTTPConnection.seekTo(MediaHTTPConnection.java:389)
E/MediaHTTPConnection(10939):   at android.media.MediaHTTPConnection.getSize(MediaHTTPConnection.java:485)
E/MediaHTTPConnection(10939):   at android.media.IMediaHTTPConnection$Stub.onTransact(IMediaHTTPConnection.java:153)
E/MediaHTTPConnection(10939):   at android.os.Binder.execTransactInternal(Binder.java:1220)
E/MediaHTTPConnection(10939):   at android.os.Binder.execTransact(Binder.java:1179)
I/MediaHTTPConnection(10939): setReadTimeout and setConnectTimeout with 8000ms
I/chromium(10939): [INFO:CONSOLE(0)] "The resource https://mp4-b.udemycdn.com/2022-10-21_20-49-11-5340453a6ea343f7fc9f3511f1257384/2/thumb-sprites.jpg?secure=_u6yi5RvRVKAkTcj0xMN8A%3D%3D%2C1670589454 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.", source: https://udemy.com/course/introduction-to-cloud-computing-on-amazon-aws-for-beginners/learn/lecture/34501964#content (0)
I/MediaHTTPConnection(10939): response code = 404
E/MediaHTTPConnection(10939): java.io.IOException
E/MediaHTTPConnection(10939):   at android.media.MediaHTTPConnection.seekTo(MediaHTTPConnection.java:389)
E/MediaHTTPConnection(10939):   at android.media.MediaHTTPConnection.readAt(MediaHTTPConnection.java:440)
E/MediaHTTPConnection(10939):   at android.media.MediaHTTPConnection.native_readAt(Native Method)
E/MediaHTTPConnection(10939):   at android.media.MediaHTTPConnection.readAt(MediaHTTPConnection.java:429)
E/MediaHTTPConnection(10939):   at android.media.IMediaHTTPConnection$Stub.onTransact(IMediaHTTPConnection.java:145)
E/MediaHTTPConnection(10939):   at android.os.Binder.execTransactInternal(Binder.java:1220)
E/MediaHTTPConnection(10939):   at android.os.Binder.execTransact(Binder.java:1179)
V/MediaPlayerNative(10939): message received msg=100, ext1=1, ext2=-1004
E/MediaPlayerNative(10939): error (1, -1004)
E/MediaPlayer(10939): Error (1,-1004)
E/chromium(10939): [ERROR:media_player_renderer.cc(256)] OnError Error: 0
V/MediaPlayerNative(10939): setVideoSurfaceTexture
V/MediaPlayer(10939): resetDrmState:  mDrmInfo=null mDrmProvisioningThread=null mPrepareDrmInProgress=false mActiveDrmScheme=false
V/MediaPlayer(10939): cleanDrmObj: mDrmObj=null mDrmSessionId=null
V/MediaPlayer-JNI(10939): release
V/MediaPlayerNative(10939): setListener
V/MediaPlayerNative(10939): disconnect
V/MediaPlayerNative(10939): destructor
V/MediaPlayerNative(10939): disconnect
I/chromium(10939): [INFO:CONSOLE(2)] "VIDEOJS: ERROR: (CODE:4 MEDIA_ERR_SRC_NOT_SUPPORTED) The media could not be loaded, either because the server or network failed or because the format is not supported. [object Object]", source: https://udemy.com/staticx/udemy/js/webpack/vendor-videojs.b650644c56cf8646f485.js (2)
E/FrameEvents(10939): updateAcquireFence: Did not find frame.
I/chromium(10939): [INFO:CONSOLE(0)] "The resource https://mp4-b.udemycdn.com/2022-10-21_20-49-11-5340453a6ea343f7fc9f3511f1257384/2/thumb-sprites.jpg?secure=_u6yi5RvRVKAkTcj0xMN8A%3D%3D%2C1670589454 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.", source: https://udemy.com/course/introduction-to-cloud-computing-on-amazon-aws-for-beginners/learn/lecture/34501964#content (0)
D/InputMethodManager(10939): startInputInner - Id : 0
I/InputMethodManager(10939): startInputInner - mService.startInputOrWindowGainedFocus
I/ViewRootImpl@4504b5[MainActivity](10939): handleAppVisibility mAppVisible=true visible=false
I/SurfaceView@1614354(10939): onWindowVisibilityChanged(8) false io.flutter.embedding.android.FlutterSurfaceView{1614354 V.E...... ........ 0,0-720,1510} of ViewRootImpl@4504b5[MainActivity]
I/SurfaceView@1614354(10939): pST: mTmpTransaction.apply, mTmpTransaction = android.view.SurfaceControl$Transaction@e4542aa
I/SurfaceView@1614354(10939): surfaceDestroyed callback.size 1 #2 io.flutter.embedding.android.FlutterSurfaceView{1614354 V.E...... ........ 0,0-720,1510}
I/SurfaceView@1614354(10939): updateSurface: mVisible = false mSurface.isValid() = true
I/SurfaceView@1614354(10939): tryReleaseSurfaces: set mRtReleaseSurfaces = true
I/SurfaceView@1614354(10939): 112565339 wPL, frameNr = 0
I/SurfaceView@1614354(10939): remove() from RT android.view.SurfaceView$SurfaceViewPositionUpdateListener@6b59c5b Surface(name=SurfaceView - com.example.flutter_webview_example/com.example.flutter_webview_example.MainActivity@1614354@1)/@0xa597cf8
I/SurfaceView@1614354(10939): remove() io.flutter.embedding.android.FlutterSurfaceView{1614354 V.E...... ........ 0,0-720,1510} Surface(name=SurfaceView - com.example.flutter_webview_example/com.example.flutter_webview_example.MainActivity@1614354@1)/@0xa597cf8
I/SurfaceView@1614354(10939): aOrMT: uB = true t = android.view.SurfaceControl$Transaction@fec61cc fN = 0 android.view.SurfaceView.access$500:124 android.view.SurfaceView$SurfaceViewPositionUpdateListener.positionLost:1785 android.graphics.RenderNode$CompositePositionUpdateListener.positionLost:326
I/SurfaceView@1614354(10939): aOrMT: vR.mWNT, vR = ViewRootImpl@4504b5[MainActivity]
I/ViewRootImpl@4504b5[MainActivity](10939): mWNT: t = android.view.SurfaceControl$Transaction@fec61cc fN = 0 android.view.SurfaceView.applyOrMergeTransaction:1628 android.view.SurfaceView.access$500:124 android.view.SurfaceView$SurfaceViewPositionUpdateListener.positionLost:1785
I/ViewRootImpl@4504b5[MainActivity](10939): mWNT: merge t to BBQ
D/OpenGLRenderer(10939): setSurface called with nullptr
D/OpenGLRenderer(10939): setSurface() destroyed EGLSurface
D/OpenGLRenderer(10939): destroyEglSurface
I/ViewRootImpl@4504b5[MainActivity](10939): Relayout returned: old=(0,0,720,1600) new=(0,0,720,1600) req=(720,1600)8 dur=19 res=0x5 s={false 0} ch=true fn=441
I/SurfaceView@1614354(10939): windowStopped(true) false io.flutter.embedding.android.FlutterSurfaceView{1614354 V.E...... ........ 0,0-720,1510} of ViewRootImpl@4504b5[MainActivity]
D/SurfaceView@1614354(10939): updateSurface: surface is not valid
D/SurfaceView@1614354(10939): updateSurface: surface is not valid
I/ViewRootImpl@4504b5[MainActivity](10939): stopped(true) old=false
I/IMM_LC  (10939): hsifw() - flags=0, caller=android.view.inputmethod.InputMethodManager.hideSoftInputFromWindow:1846 android.view.inputmethod.InputMethodManager.hideSoftInputFromWindow:1815 io.flutter.plugin.editing.TextInputPlugin.clearPlatformViewClient:372 io.flutter.plugin.platform.PlatformViewsController$1.lambda$createForTextureLayer$1$io-flutter-plugin-platform-PlatformViewsController$1:358 io.flutter.plugin.platform.PlatformViewsController$1$$ExternalSyntheticLambda0.onFocusChange:4
I/IMM_LC  (10939): hideSoftInputFromWindow - mService.hideSoftInput
E/InputAwareWebView(10939): Can't create a proxy view because there's no container view. Text input may not work.
D/SurfaceView@1614354(10939): updateSurface: surface is not valid
I/ViewRootImpl@4504b5[MainActivity](10939): MSG_WINDOW_FOCUS_CHANGED 0 1
D/InputTransport(10939): Input channel destroyed: 'ClientS', fd=180
W/System  (10939): A resource failed to call end.
V/MediaPlayer-JNI(10939): native_finalize
V/MediaPlayer-JNI(10939): release
W/System  (10939): A resource failed to call end.
```

Body:
I'm trying to create a simple flutter app using webview to display Udemy course following this tutorial https://www.digitalocean.com/community/tutorials/flutter-webview

The app is working fine but the video doesn't appear

This is what I get from the log

Launching lib\main.dart on SM A127F in debug mode...
Running Gradle task 'assembleDebug'...
√  Built build\app\outputs\flutter-apk\app-debug.apk.
Debug service listening on ws://127.0.0.1:56602/gHPXg4pWPuw=/ws
Syncing files to device SM A127F...
W/webview_exampl(10939): Entry not found
I/WebViewFactory(10939): Loading com.google.android.webview version 107.0.5304.141 (code 530414133)
W/webview_exampl(10939): Accessing hidden method Landroid/os/Trace;->isTagEnabled(J)Z (unsupported, reflection, allowed)
W/webview_exampl(10939): Accessing hidden method Landroid/os/Trace;->traceBegin(JLjava/lang/String;)V (unsupported, reflection, allowed)
W/webview_exampl(10939): Accessing hidden method Landroid/os/Trace;->traceEnd(J)V (unsupported, reflection, allowed)
W/webview_exampl(10939): Accessing hidden method Landroid/os/Trace;->asyncTraceBegin(JLjava/lang/String;I)V (unsupported, reflection, allowed)
W/webview_exampl(10939): Accessing hidden method Landroid/os/Trace;->asyncTraceEnd(JLjava/lang/String;I)V (unsupported, reflection, allowed)
I/cr_WVCFactoryProvider(10939): Loaded version=107.0.5304.141 minSdkVersion=29 isBundle=true multiprocess=true packageId=2
D/hw-ProcessState(10939): Binder ioctl to enable oneway spam detection failed: Invalid argument
I/cr_LibraryLoader(10939): Successfully loaded native library
I/cr_CachingUmaRecorder(10939): Flushed 9 samples from 9 histograms.
W/chromium(10939): [WARNING:dns_config_service_android.cc(115)] Failed to read DnsConfig.
D/CompatibilityChangeReporter(10939): Compat change id reported: 171228096; UID 10438; state: ENABLED
W/webview_exampl(10939): Accessing hidden method Landroid/media/AudioManager;->getOutputLatency(I)I (unsupported, reflection, allowed)
W/cr_media(10939): BLUETOOTH_CONNECT permission is missing.
W/cr_media(10939): registerBluetoothIntentsIfNeeded: Requires BLUETOOTH permission
I/PlatformViewsController(10939): Hosting view in view hierarchy for platform view: 0
D/OpenGLRenderer(10939): eglCreateWindowSurface
E/FrameEvents(10939): updateAcquireFence: Did not find frame.
I/Choreographer(10939): Skipped 82 frames!  The application may be doing too much work on its main thread.
D/ViewRootImpl@4504b5[MainActivity](10939): Creating frameDrawingCallback nextDrawUseBlastSync=false reportNextDraw=true hasBlurUpdates=false
D/ViewRootImpl@4504b5[MainActivity](10939): Creating frameCompleteCallback
W/chromium(10939): [WARNING:display_webview.cc(31)] WebView overlays are enabled!
E/FrameEvents(10939): updateAcquireFence: Did not find frame.
D/ViewRootImpl@4504b5[MainActivity](10939): Received frameDrawingCallback frameNum=1. Creating transactionCompleteCallback=false
I/SurfaceView@1614354(10939): uSP: rtp = Rect(0, 0 - 720, 1510) rtsw = 720 rtsh = 1510
I/SurfaceView@1614354(10939): onSSPAndSRT: pl = 0 pt = 0 sx = 1.0 sy = 1.0
I/SurfaceView@1614354(10939): aOrMT: uB = true t = android.view.SurfaceControl$Transaction@aa761b3 fN = 1 android.view.SurfaceView.access$500:124 android.view.SurfaceView$SurfaceViewPositionUpdateListener.positionChanged:1728 android.graphics.RenderNode$CompositePositionUpdateListener.positionChanged:319
I/SurfaceView@1614354(10939): aOrMT: vR.mWNT, vR = ViewRootImpl@4504b5[MainActivity]
I/ViewRootImpl@4504b5[MainActivity](10939): mWNT: t = android.view.SurfaceControl$Transaction@aa761b3 fN = 1 android.view.SurfaceView.applyOrMergeTransaction:1628 android.view.SurfaceView.access$500:124 android.view.SurfaceView$SurfaceViewPositionUpdateListener.positionChanged:1728
I/ViewRootImpl@4504b5[MainActivity](10939): mWNT: merge t to BBQ
D/ViewRootImpl@4504b5[MainActivity](10939): Received frameCompleteCallback  lastAcquiredFrameNum=1 lastAttemptedDrawFrameNum=1
I/OpenGLRenderer(10939): Davey! duration=1709ms; Flags=1, FrameTimelineVsyncId=8231340, IntendedVsync=182355268658186, Vsync=182356635324798, InputEventId=0, HandleInputStart=182356651941837, AnimationStart=182356651946606, PerformTraversalsStart=182356660920529, DrawStart=182356683801490, FrameDeadline=182355285324852, FrameInterval=182356651700875, FrameStartTime=16666666, SyncQueued=182356698667221, SyncStart=182356782952337, IssueDrawCommandsStart=182356783246490, SwapBuffers=182357056454798, FrameCompleted=182357062442183, DequeueBufferDuration=3513231, QueueBufferDuration=3138616, GpuCompleted=182357060938836, SwapBuffersCompleted=182357062442183, DisplayPresentTime=0,
I/ViewRootImpl@4504b5[MainActivity](10939): [DP] pdf(0) 1 android.view.ViewRootImpl.lambda$addFrameCompleteCallbackIfNeeded$3$ViewRootImpl:4995 android.view.ViewRootImpl$$ExternalSyntheticLambda16.run:6 android.os.Handler.handleCallback:938
I/ViewRootImpl@4504b5[MainActivity](10939): [DP] rdf()
D/ViewRootImpl@4504b5[MainActivity](10939): reportDrawFinished (fn: -1)
E/FrameEvents(10939): updateAcquireFence: Did not find frame.
I/ViewRootImpl@4504b5[MainActivity](10939): MSG_WINDOW_FOCUS_CHANGED 1 1
D/InputMethodManager(10939): startInputInner - Id : 0
I/InputMethodManager(10939): startInputInner - mService.startInputOrWindowGainedFocus
D/InputMethodManager(10939): startInputInner - Id : 0
E/FrameEvents(10939): updateAcquireFence: Did not find frame.
I/chromium(10939): [INFO:CONSOLE(2)] "Uncaught (in promise) Error: Request failed with status code 403", source: https://udemy.com/staticx/udemy/js/webpack/entry-udlite-baseline-vendor.9ce19f0ae4e37916d282.js (2)
E/FrameEvents(10939): updateAcquireFence: Did not find frame.
I/webview_exampl(10939): Compiler allocated 4546KB to compile void android.view.ViewRootImpl.performTraversals()
E/FrameEvents(10939): updateAcquireFence: Did not find frame.
D/InputMethodManager(10939): startInputInner - Id : 0
I/InputMethodManager(10939): startInputInner - mService.startInputOrWindowGainedFocus
E/FrameEvents(10939): updateAcquireFence: Did not find frame.
I/ViewRootImpl@4504b5[MainActivity](10939): handleAppVisibility mAppVisible=true visible=false
I/ViewRootImpl@4504b5[MainActivity](10939): stopped(true) old=false
I/SurfaceView@1614354(10939): 116162559 wPL, frameNr = 0
I/SurfaceView@1614354(10939): aOrMT: uB = true t = android.view.SurfaceControl$Transaction@fec61cc fN = 0 android.view.SurfaceView.access$500:124 android.view.SurfaceView$SurfaceViewPositionUpdateListener.positionLost:1785 android.graphics.RenderNode$CompositePositionUpdateListener.positionLost:326
I/SurfaceView@1614354(10939): aOrMT: vR.mWNT, vR = ViewRootImpl@4504b5[MainActivity]
I/ViewRootImpl@4504b5[MainActivity](10939): mWNT: t = android.view.SurfaceControl$Transaction@fec61cc fN = 0 android.view.SurfaceView.applyOrMergeTransaction:1628 android.view.SurfaceView.access$500:124 android.view.SurfaceView$SurfaceViewPositionUpdateListener.positionLost:1785
I/ViewRootImpl@4504b5[MainActivity](10939): mWNT: merge t to BBQ
I/SurfaceView@1614354(10939): windowStopped(true) false io.flutter.embedding.android.FlutterSurfaceView{1614354 V.E...... ........ 0,0-720,1510} of ViewRootImpl@4504b5[MainActivity]
I/SurfaceView@1614354(10939): pST: mTmpTransaction.apply, mTmpTransaction = android.view.SurfaceControl$Transaction@e4542aa
I/SurfaceView@1614354(10939): surfaceDestroyed callback.size 1 #1 io.flutter.embedding.android.FlutterSurfaceView{1614354 V.E...... ........ 0,0-720,1510}
I/SurfaceView@1614354(10939): updateSurface: mVisible = false mSurface.isValid() = true
I/SurfaceView@1614354(10939): remove() io.flutter.embedding.android.FlutterSurfaceView{1614354 V.E...... ........ 0,0-720,1510} Surface(name=SurfaceView - com.example.flutter_webview_example/com.example.flutter_webview_example.MainActivity@1614354@0)/@0xd39fc15
I/SurfaceView@1614354(10939): onWindowVisibilityChanged(8) false io.flutter.embedding.android.FlutterSurfaceView{1614354 V.E...... ........ 0,0-720,1510} of ViewRootImpl@4504b5[MainActivity]
D/SurfaceView@1614354(10939): updateSurface: surface is not valid
D/OpenGLRenderer(10939): setSurface called with nullptr
D/OpenGLRenderer(10939): setSurface() destroyed EGLSurface
D/OpenGLRenderer(10939): destroyEglSurface
I/ViewRootImpl@4504b5[MainActivity](10939): Relayout returned: old=(0,0,720,1600) new=(0,0,720,1600) req=(720,1600)8 dur=19 res=0x5 s={false 0} ch=false fn=-1
D/SurfaceView@1614354(10939): updateSurface: surface is not valid
I/ViewRootImpl@4504b5[MainActivity](10939): MSG_WINDOW_FOCUS_CHANGED 0 1
I/ViewRootImpl@4504b5[MainActivity](10939): handleAppVisibility mAppVisible=false visible=true
I/SurfaceView@1614354(10939): onWindowVisibilityChanged(4) false io.flutter.embedding.android.FlutterSurfaceView{1614354 V.E...... ........ 0,0-720,1510} of ViewRootImpl@4504b5[MainActivity]
D/SurfaceView@1614354(10939): updateSurface: surface is not valid
D/OpenGLRenderer(10939): setSurface called with nullptr
I/ViewRootImpl@4504b5[MainActivity](10939): Relayout returned: old=(0,0,720,1600) new=(0,0,720,1600) req=(720,1600)4 dur=24 res=0x1 s={false 0} ch=false fn=-1
D/SurfaceView@1614354(10939): updateSurface: surface is not valid
I/ViewRootImpl@4504b5[MainActivity](10939): stopped(false) old=true
I/ViewRootImpl@4504b5[MainActivity](10939): stopped(false) old=false
I/DecorView(10939): notifyKeepScreenOnChanged: keepScreenOn=false
I/SurfaceView@1614354(10939): onWindowVisibilityChanged(0) false io.flutter.embedding.android.FlutterSurfaceView{1614354 V.E...... ........ 0,0-720,1510} of ViewRootImpl@4504b5[MainActivity]
D/SurfaceView@1614354(10939): updateSurface: surface is not valid
D/OpenGLRenderer(10939): setSurface called with nullptr
I/ViewRootImpl@4504b5[MainActivity](10939): Relayout returned: old=(0,0,720,1600) new=(0,0,720,1600) req=(720,1600)0 dur=20 res=0x7 s={true -5476376626480246784} ch=true fn=-1
D/OpenGLRenderer(10939): eglCreateWindowSurface
I/SurfaceView@1614354(10939): windowStopped(false) true io.flutter.embedding.android.FlutterSurfaceView{1614354 V.E...... ........ 0,0-720,1510} of ViewRootImpl@4504b5[MainActivity]
I/SurfaceView@1614354(10939): pST: sr = Rect(0, 0 - 720, 1510) sw = 720 sh = 1510
I/SurfaceView@1614354(10939): onSSPAndSRT: pl = 0 pt = 0 sx = 1.0 sy = 1.0
I/SurfaceView@1614354(10939): pST: mTmpTransaction.apply, mTmpTransaction = android.view.SurfaceControl$Transaction@e4542aa
I/SurfaceView@1614354(10939): updateSurface: mVisible = true mSurface.isValid() = true
I/SurfaceView@1614354(10939): updateSurface: mSurfaceCreated = false surfaceChanged = true visibleChanged = true
I/SurfaceView@1614354(10939): surfaceCreated 1 #1 io.flutter.embedding.android.FlutterSurfaceView{1614354 V.E...... ........ 0,0-720,1510}
I/SurfaceView@1614354(10939): surfaceChanged (720,1510) 1 #1 io.flutter.embedding.android.FlutterSurfaceView{1614354 V.E...... ........ 0,0-720,1510}
I/ViewRootImpl@4504b5[MainActivity](10939): [DP] dp(1) 1 android.view.SurfaceView.updateSurface:1375 android.view.SurfaceView.setWindowStopped:383 android.view.SurfaceView.surfaceCreated:2051
I/ViewRootImpl@4504b5[MainActivity](10939): [DP] pdf(0) 1 android.view.SurfaceView.notifyDrawFinished:599 android.view.SurfaceView.performDrawFinished:586 android.view.SurfaceView.$r8$lambda$st27mCkd9jfJkTrN_P3qIGKX6NY:0
I/ViewRootImpl@4504b5[MainActivity](10939): [DP] rdf()
D/ViewRootImpl@4504b5[MainActivity](10939): reportDrawFinished (fn: -1)
I/ViewRootImpl@4504b5[MainActivity](10939): [DP] dp(1) 1 android.view.ViewRootImpl.reportNextDraw:11420 android.view.ViewRootImpl.performTraversals:4193 android.view.ViewRootImpl.doTraversal:2919
D/ViewRootImpl@4504b5[MainActivity](10939): Creating frameDrawingCallback nextDrawUseBlastSync=false reportNextDraw=true hasBlurUpdates=false
D/ViewRootImpl@4504b5[MainActivity](10939): Creating frameCompleteCallback
E/FrameEvents(10939): updateAcquireFence: Did not find frame.
I/SurfaceView@1614354(10939): uSP: rtp = Rect(0, 0 - 720, 1510) rtsw = 720 rtsh = 1510
I/SurfaceView@1614354(10939): onSSPAndSRT: pl = 0 pt = 0 sx = 1.0 sy = 1.0
I/SurfaceView@1614354(10939): aOrMT: uB = true t = android.view.SurfaceControl$Transaction@d4e98cd fN = 1 android.view.SurfaceView.access$500:124 android.view.SurfaceView$SurfaceViewPositionUpdateListener.positionChanged:1728 android.graphics.RenderNode$CompositePositionUpdateListener.positionChanged:319
I/SurfaceView@1614354(10939): aOrMT: vR.mWNT, vR = ViewRootImpl@4504b5[MainActivity]
I/ViewRootImpl@4504b5[MainActivity](10939): mWNT: t = android.view.SurfaceControl$Transaction@d4e98cd fN = 1 android.view.SurfaceView.applyOrMergeTransaction:1628 android.view.SurfaceView.access$500:124 android.view.SurfaceView$SurfaceViewPositionUpdateListener.positionChanged:1728
I/ViewRootImpl@4504b5[MainActivity](10939): mWNT: merge t to BBQ
D/ViewRootImpl@4504b5[MainActivity](10939): Received frameDrawingCallback frameNum=1. Creating transactionCompleteCallback=false
D/ViewRootImpl@4504b5[MainActivity](10939): Received frameCompleteCallback  lastAcquiredFrameNum=1 lastAttemptedDrawFrameNum=1
I/ViewRootImpl@4504b5[MainActivity](10939): [DP] pdf(0) 1 android.view.ViewRootImpl.lambda$addFrameCompleteCallbackIfNeeded$3$ViewRootImpl:4995 android.view.ViewRootImpl$$ExternalSyntheticLambda16.run:6 android.os.Handler.handleCallback:938
I/ViewRootImpl@4504b5[MainActivity](10939): [DP] rdf()
D/ViewRootImpl@4504b5[MainActivity](10939): reportDrawFinished (fn: -1)
E/FrameEvents(10939): updateAcquireFence: Did not find frame.
D/InsetsSourceConsumer(10939): ensureControlAlpha: for ITYPE_NAVIGATION_BAR on com.example.flutter_webview_example/com.example.flutter_webview_example.MainActivity
D/InsetsSourceConsumer(10939): ensureControlAlpha: for ITYPE_STATUS_BAR on com.example.flutter_webview_example/com.example.flutter_webview_example.MainActivity
I/ViewRootImpl@4504b5[MainActivity](10939): MSG_WINDOW_FOCUS_CHANGED 1 1
D/InputMethodManager(10939): startInputInner - Id : 0
I/InputMethodManager(10939): startInputInner - mService.startInputOrWindowGainedFocus
I/ViewRootImpl@4504b5[MainActivity](10939): ViewPostIme pointer 0
I/ViewRootImpl@4504b5[MainActivity](10939): ViewPostIme pointer 1
E/FrameEvents(10939): updateAcquireFence: Did not find frame.
D/InputMethodManager(10939): startInputInner - Id : 0
I/InputMethodManager(10939): startInputInner - mService.startInputOrWindowGainedFocus
I/IMM_LC  (10939): hsifw() - flags=0, caller=android.view.inputmethod.InputMethodManager.hideSoftInputFromWindow:1846 org.chromium.content.browser.input.ImeAdapterImpl.f:40 org.chromium.content.browser.input.ImeAdapterImpl.updateState:32 android.os.MessageQueue.nativePollOnce:-2 android.os.MessageQueue.next:335
I/IMM_LC  (10939): hideSoftInputFromWindow - mService.hideSoftInput
E/FrameEvents(10939): updateAcquireFence: Did not find frame.
I/IMM_LC  (10939): hsifw() - flags=0, caller=android.view.inputmethod.InputMethodManager.hideSoftInputFromWindow:1846 org.chromium.content.browser.input.ImeAdapterImpl.f:40 org.chromium.content.browser.input.ImeAdapterImpl.updateState:32 android.os.MessageQueue.nativePollOnce:-2 android.os.MessageQueue.next:335
I/IMM_LC  (10939): hideSoftInputFromWindow - mService.hideSoftInput
W/chromium(10939): [WARNING:spdy_session.cc(3502)] Received HEADERS for invalid stream 35
E/FrameEvents(10939): updateAcquireFence: Did not find frame.
I/chromium(10939): [INFO:CONSOLE(2)] "VIDEOJS: WARN: videojs.HlsSourceHandler is deprecated. Use videojs.VhsSourceHandler instead.", source: https://udemy.com/staticx/udemy/js/webpack/vendor-videojs.b650644c56cf8646f485.js (2)
I/DrmHal  (10939): found instance=clearkey version=android.hardware.drm@1.4::IDrmFactory
I/DrmHal  (10939): found instance=widevine version=android.hardware.drm@1.4::IDrmFactory
W/AudioCapabilities(10939): Unsupported mime audio/x-ima
W/AudioCapabilities(10939): Unsupported mime audio/mpeg-L1
W/AudioCapabilities(10939): Unsupported mime audio/mpeg-L2
W/VideoCapabilities(10939): Unsupported mime video/wvc1
W/VideoCapabilities(10939): Unsupported mime video/x-ms-wmv
W/VideoCapabilities(10939): Unsupported mime video/wvc1
D/InputTransport(10939): Input channel destroyed: 'ClientS', fd=238
D/InputTransport(10939): Input channel destroyed: 'ClientS', fd=260
D/InputTransport(10939): Input channel destroyed: 'ClientS', fd=180
E/FrameEvents(10939): updateAcquireFence: Did not find frame.
I/chromium(10939): [INFO:CONSOLE(2)] "VIDEOJS: WARN: videojs.HlsSourceHandler is deprecated. Use videojs.VhsSourceHandler instead.", source: https://udemy.com/staticx/udemy/js/webpack/vendor-videojs.b650644c56cf8646f485.js (2)
E/FrameEvents(10939): updateAcquireFence: Did not find frame.
W/chromium(10939): [WARNING:spdy_session.cc(3234)] Received RST for invalid stream7
E/FrameEvents(10939): updateAcquireFence: Did not find frame.
E/cr_MediaCodecUtil(10939): Decoder for type video/x-vnd.on2.vp9 is not supported on this device [requireSoftware=false, requireHardware=true].
E/FrameEvents(10939): updateAcquireFence: Did not find frame.
E/cr_MediaCodecUtil(10939): Decoder for type video/av01 is not supported on this device [requireSoftware=false, requireHardware=true].
E/FrameEvents(10939): updateAcquireFence: Did not find frame.
V/MediaPlayer-JNI(10939): native_setup
V/MediaPlayerNative(10939): constructor
V/MediaPlayerNative(10939): setListener
V/MediaPlayer-JNI(10939): setParameter: key 1400
V/MediaPlayerNative(10939): MediaPlayer::setParameter(1400)
V/MediaPlayer-JNI(10939): set_session_id(): 15345
V/MediaPlayerNative(10939): MediaPlayer::setAudioSessionId(15345)
V/MediaPlayer-JNI(10939): setDataSourceFD: fd 133
V/MediaPlayerNative(10939): setDataSource(133, 110063172, 58)
V/MediaPlayerNative(10939): setVideoSurfaceTexture
V/MediaPlayerNative(10939): prepare
V/MediaPlayerNative(10939): message received msg=200, ext1=10973, ext2=0
W/MediaPlayerNative(10939): info/warning (10973, 0)
V/MediaPlayerNative(10939): message received msg=1, ext1=0, ext2=0
V/MediaPlayerNative(10939): MediaPlayer::notify() prepared
V/MediaPlayerNative(10939): signal application thread
V/MediaPlayerNative(10939): prepare complete - status=0
V/MediaPlayerNative(10939): invoke 76
V/MediaPlayer-JNI(10939): native_setup
V/MediaPlayerNative(10939): constructor
V/MediaPlayerNative(10939): setListener
V/MediaPlayer-JNI(10939): setVolume: left 0.000000  right 0.000000
V/MediaPlayerNative(10939): MediaPlayer::setVolume(0.000000, 0.000000)
V/MediaHTTPService(10939): MediaHTTPService(android.media.MediaHTTPService@8743ff0): Cookies: null
V/MediaPlayerNative(10939): setVideoSurfaceTexture
V/MediaPlayerNative(10939): prepareAsync
V/MediaPlayerNative(10939): setVideoSurfaceTexture
V/MediaHTTPService(10939): makeHTTPConnection: CookieManager created: java.net.CookieManager@89a8969
V/MediaHTTPService(10939): makeHTTPConnection(android.media.MediaHTTPService@8743ff0): cookieHandler: java.net.CookieManager@89a8969 Cookies: null
I/DecorView(10939): notifyKeepScreenOnChanged: keepScreenOn=true
I/MediaHTTPConnection(10939): setReadTimeout and setConnectTimeout with 8000ms
I/ViewRootImpl@4504b5[MainActivity](10939): Relayout returned: old=(0,0,720,1600) new=(0,0,720,1600) req=(720,1600)0 dur=15 res=0x1 s={true -5476376626480246784} ch=false fn=191
E/FrameEvents(10939): updateAcquireFence: Did not find frame.
V/MediaPlayer-JNI(10939): setVolume: left 1.000000  right 1.000000
V/MediaPlayerNative(10939): MediaPlayer::setVolume(1.000000, 1.000000)
V/MediaPlayerNative(10939): invoke 76
E/FrameEvents(10939): updateAcquireFence: Did not find frame.
I/MediaHTTPConnection(10939): response code = 200
I/MediaHTTPConnection(10939): setReadTimeout and setConnectTimeout with 8000ms
I/MediaHTTPConnection(10939): response code = 200
I/MediaHTTPConnection(10939): setReadTimeout and setConnectTimeout with 8000ms
V/MediaPlayer-JNI(10939): native_finalize
V/MediaPlayer-JNI(10939): release
V/MediaPlayer-JNI(10939): native_finalize
V/MediaPlayer-JNI(10939): release
V/MediaPlayer-JNI(10939): native_finalize
V/MediaPlayer-JNI(10939): release
I/MediaHTTPConnection(10939): response code = 404
E/MediaHTTPConnection(10939): java.io.IOException
E/MediaHTTPConnection(10939):   at android.media.MediaHTTPConnection.seekTo(MediaHTTPConnection.java:389)
E/MediaHTTPConnection(10939):   at android.media.MediaHTTPConnection.getSize(MediaHTTPConnection.java:485)
E/MediaHTTPConnection(10939):   at android.media.IMediaHTTPConnection$Stub.onTransact(IMediaHTTPConnection.java:153)
E/MediaHTTPConnection(10939):   at android.os.Binder.execTransactInternal(Binder.java:1220)
E/MediaHTTPConnection(10939):   at android.os.Binder.execTransact(Binder.java:1179)
I/MediaHTTPConnection(10939): setReadTimeout and setConnectTimeout with 8000ms
I/chromium(10939): [INFO:CONSOLE(0)] "The resource https://mp4-b.udemycdn.com/2022-10-21_20-49-11-5340453a6ea343f7fc9f3511f1257384/2/thumb-sprites.jpg?secure=_u6yi5RvRVKAkTcj0xMN8A%3D%3D%2C1670589454 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.", source: https://udemy.com/course/introduction-to-cloud-computing-on-amazon-aws-for-beginners/learn/lecture/34501964#content (0)
I/MediaHTTPConnection(10939): response code = 404
E/MediaHTTPConnection(10939): java.io.IOException
E/MediaHTTPConnection(10939):   at android.media.MediaHTTPConnection.seekTo(MediaHTTPConnection.java:389)
E/MediaHTTPConnection(10939):   at android.media.MediaHTTPConnection.readAt(MediaHTTPConnection.java:440)
E/MediaHTTPConnection(10939):   at android.media.MediaHTTPConnection.native_readAt(Native Method)
E/MediaHTTPConnection(10939):   at android.media.MediaHTTPConnection.readAt(MediaHTTPConnection.java:429)
E/MediaHTTPConnection(10939):   at android.media.IMediaHTTPConnection$Stub.onTransact(IMediaHTTPConnection.java:145)
E/MediaHTTPConnection(10939):   at android.os.Binder.execTransactInternal(Binder.java:1220)
E/MediaHTTPConnection(10939):   at android.os.Binder.execTransact(Binder.java:1179)
V/MediaPlayerNative(10939): message received msg=100, ext1=1, ext2=-1004
E/MediaPlayerNative(10939): error (1, -1004)
E/MediaPlayer(10939): Error (1,-1004)
E/chromium(10939): [ERROR:media_player_renderer.cc(256)] OnError Error: 0
V/MediaPlayerNative(10939): setVideoSurfaceTexture
V/MediaPlayer(10939): resetDrmState:  mDrmInfo=null mDrmProvisioningThread=null mPrepareDrmInProgress=false mActiveDrmScheme=false
V/MediaPlayer(10939): cleanDrmObj: mDrmObj=null mDrmSessionId=null
V/MediaPlayer-JNI(10939): release
V/MediaPlayerNative(10939): setListener
V/MediaPlayerNative(10939): disconnect
V/MediaPlayerNative(10939): destructor
V/MediaPlayerNative(10939): disconnect
I/chromium(10939): [INFO:CONSOLE(2)] "VIDEOJS: ERROR: (CODE:4 MEDIA_ERR_SRC_NOT_SUPPORTED) The media could not be loaded, either because the server or network failed or because the format is not supported. [object Object]", source: https://udemy.com/staticx/udemy/js/webpack/vendor-videojs.b650644c56cf8646f485.js (2)
E/FrameEvents(10939): updateAcquireFence: Did not find frame.
I/chromium(10939): [INFO:CONSOLE(0)] "The resource https://mp4-b.udemycdn.com/2022-10-21_20-49-11-5340453a6ea343f7fc9f3511f1257384/2/thumb-sprites.jpg?secure=_u6yi5RvRVKAkTcj0xMN8A%3D%3D%2C1670589454 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.", source: https://udemy.com/course/introduction-to-cloud-computing-on-amazon-aws-for-beginners/learn/lecture/34501964#content (0)
D/InputMethodManager(10939): startInputInner - Id : 0
I/InputMethodManager(10939): startInputInner - mService.startInputOrWindowGainedFocus
I/ViewRootImpl@4504b5[MainActivity](10939): handleAppVisibility mAppVisible=true visible=false
I/SurfaceView@1614354(10939): onWindowVisibilityChanged(8) false io.flutter.embedding.android.FlutterSurfaceView{1614354 V.E...... ........ 0,0-720,1510} of ViewRootImpl@4504b5[MainActivity]
I/SurfaceView@1614354(10939): pST: mTmpTransaction.apply, mTmpTransaction = android.view.SurfaceControl$Transaction@e4542aa
I/SurfaceView@1614354(10939): surfaceDestroyed callback.size 1 #2 io.flutter.embedding.android.FlutterSurfaceView{1614354 V.E...... ........ 0,0-720,1510}
I/SurfaceView@1614354(10939): updateSurface: mVisible = false mSurface.isValid() = true
I/SurfaceView@1614354(10939): tryReleaseSurfaces: set mRtReleaseSurfaces = true
I/SurfaceView@1614354(10939): 112565339 wPL, frameNr = 0
I/SurfaceView@1614354(10939): remove() from RT android.view.SurfaceView$SurfaceViewPositionUpdateListener@6b59c5b Surface(name=SurfaceView - com.example.flutter_webview_example/com.example.flutter_webview_example.MainActivity@1614354@1)/@0xa597cf8
I/SurfaceView@1614354(10939): remove() io.flutter.embedding.android.FlutterSurfaceView{1614354 V.E...... ........ 0,0-720,1510} Surface(name=SurfaceView - com.example.flutter_webview_example/com.example.flutter_webview_example.MainActivity@1614354@1)/@0xa597cf8
I/SurfaceView@1614354(10939): aOrMT: uB = true t = android.view.SurfaceControl$Transaction@fec61cc fN = 0 android.view.SurfaceView.access$500:124 android.view.SurfaceView$SurfaceViewPositionUpdateListener.positionLost:1785 android.graphics.RenderNode$CompositePositionUpdateListener.positionLost:326
I/SurfaceView@1614354(10939): aOrMT: vR.mWNT, vR = ViewRootImpl@4504b5[MainActivity]
I/ViewRootImpl@4504b5[MainActivity](10939): mWNT: t = android.view.SurfaceControl$Transaction@fec61cc fN = 0 android.view.SurfaceView.applyOrMergeTransaction:1628 android.view.SurfaceView.access$500:124 android.view.SurfaceView$SurfaceViewPositionUpdateListener.positionLost:1785
I/ViewRootImpl@4504b5[MainActivity](10939): mWNT: merge t to BBQ
D/OpenGLRenderer(10939): setSurface called with nullptr
D/OpenGLRenderer(10939): setSurface() destroyed EGLSurface
D/OpenGLRenderer(10939): destroyEglSurface
I/ViewRootImpl@4504b5[MainActivity](10939): Relayout returned: old=(0,0,720,1600) new=(0,0,720,1600) req=(720,1600)8 dur=19 res=0x5 s={false 0} ch=true fn=441
I/SurfaceView@1614354(10939): windowStopped(true) false io.flutter.embedding.android.FlutterSurfaceView{1614354 V.E...... ........ 0,0-720,1510} of ViewRootImpl@4504b5[MainActivity]
D/SurfaceView@1614354(10939): updateSurface: surface is not valid
D/SurfaceView@1614354(10939): updateSurface: surface is not valid
I/ViewRootImpl@4504b5[MainActivity](10939): stopped(true) old=false
I/IMM_LC  (10939): hsifw() - flags=0, caller=android.view.inputmethod.InputMethodManager.hideSoftInputFromWindow:1846 android.view.inputmethod.InputMethodManager.hideSoftInputFromWindow:1815 io.flutter.plugin.editing.TextInputPlugin.clearPlatformViewClient:372 io.flutter.plugin.platform.PlatformViewsController$1.lambda$createForTextureLayer$1$io-flutter-plugin-platform-PlatformViewsController$1:358 io.flutter.plugin.platform.PlatformViewsController$1$$ExternalSyntheticLambda0.onFocusChange:4
I/IMM_LC  (10939): hideSoftInputFromWindow - mService.hideSoftInput
E/InputAwareWebView(10939): Can't create a proxy view because there's no container view. Text input may not work.
D/SurfaceView@1614354(10939): updateSurface: surface is not valid
I/ViewRootImpl@4504b5[MainActivity](10939): MSG_WINDOW_FOCUS_CHANGED 0 1
D/InputTransport(10939): Input channel destroyed: 'ClientS', fd=180
W/System  (10939): A resource failed to call end.
V/MediaPlayer-JNI(10939): native_finalize
V/MediaPlayer-JNI(10939): release
W/System  (10939): A resource failed to call end.


来源: stackexchange

问:
Read asset file from c++ in flutter through ffi
In flutter project I have data file in asset folder.
I want to read that data file in c++ code.
How can I read file, or what is the path of asset file in c++?

I searched internet, but I can't find solution.

ContentLicense: CC BY-SA 4.0


问:
Create custom consent form for AdMob
Is it possible to create a custom consent form for AdMob instead of using the default AdMob form?

I ask because the default is very limited in style and doesn't look user friendly.
As I remember, some time ago there was an option to create your own form - not sure if there is such option with User Messaging Platform.

Title: Create custom consent form for AdMob


问:
Any trick to group by A and B or C
I have a simple table:

```<code>┌─A─┬─B─┬─C─┐
│ 1 │ 1 │ 1 │
│ 1 │ 2 │ 1 │
│ 1 │ 3 │ 3 │
└───┴───┴───┘
</code>```

Is there any trick to group by A and B or C (or D or E or ... arbitary cols count)?

Something like:

```<code>select A, groupArray(B) as B, groupArray(C) as C
from test
group by A and (B or C)
</code>```

Expecting:

```<code>┌─A─┬─B----─┬─C─----┐
│ 1 │ [1,2] │ [1,1] │  // A and C matched for first two rows
│ 1 │ [3]   │ [3]   │  // A matched but not B neither C matched
└───┴──----─┴──----─┘
</code>```

Script for clickhouse:

```<code>create table tests
(
    A UInt64,
    B UInt64,
    C UInt64
)
    engine = Memory;

insert into tests (A, B, C)
values (1, 1, 1),
       (1, 2, 1),
       (1, 3, 3);
</code>```

Title: Any trick to group by A and B or C

Body:
I have a simple table:

┌─A─┬─B─┬─C─┐
│ 1 │ 1 │ 1 │
│ 1 │ 2 │ 1 │
│ 1 │ 3 │ 3 │
└───┴───┴───┘

Is there any trick to group by A and B or C (or D or E or ... arbitary cols count)?

Something like:

select A, groupArray(B) as B, groupArray(C) as C
from test
group by A and (B or C)

Expecting:

┌─A─┬─B----─┬─C─----┐
│ 1 │ [1,2] │ [1,1] │  // A and C matched for first two rows
│ 1 │ [3]   │ [3]   │  // A matched but not B neither C matched
└───┴──----─┴──----─┘

Script for clickhouse:

create table tests
(
    A UInt64,
    B UInt64,
    C UInt64
)
    engine = Memory;

insert into tests (A, B, C)
values (1, 1, 1),
       (1, 2, 1),
       (1, 3, 3);


问:
Sitecore xdb rebuild index fails at finishing stage
we are using solr cloud with zookeeper for Sitecore 10.2 environment. We have created xdb and xdb_rebuild collections with aliases xdb_mainalias and xdb_rebuildalias respectively. When we trigger xdb rebuild, it moves all the way till finishing stage (95%) and fails there. When we dig the logs it says

```<code>[Error] An error occured during index rebuilding. There will be another attempt to check. The check interval after an error is 00:00:20.
Sitecore.Xdb.Collection.Search.Solr.Failures.SolrRebuildCoreNotFoundException: Collection name for alias: [xdb_rebuild] not found in Zookeeper configuration.
   at Sitecore.Xdb.Collection.Search.Solr.SolrCloudRebuildHelper.<LoadCollectionNames>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Sitecore.Xdb.Collection.Search.Solr.SolrCloudRebuildHelper.<SwapCores>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Sitecore.Xdb.Collection.Search.Solr.SolrIndexRebuilder.<CompleteRebuild>d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Sitecore.Xdb.Collection.Indexing.Rebuild.IndexRebuildFlow.<CompleteRebuild>d__28.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Sitecore.Xdb.Collection.Indexing.Rebuild.IndexRebuildFlow.<RunRebuild>d__25.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Sitecore.Xdb.Collection.Indexing.Rebuild.IndexRebuildFlow.RebuildStatusWatcher.<>c__DisplayClass5_0.<<Start>g__RunRebuildFlowCycle|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Sitecore.Xdb.Collection.Indexing.Rebuild.TaskExtension.<ExecuteWithInterval>d__0.MoveNext()

</code>```

We have already uploaded configs to zookeeper and created xdb collections using the same. Are move missing anything here?

Body:
we are using solr cloud with zookeeper for Sitecore 10.2 environment. We have created xdb and xdb_rebuild collections with aliases xdb_mainalias and xdb_rebuildalias respectively. When we trigger xdb rebuild, it moves all the way till finishing stage (95%) and fails there. When we dig the logs it says

[Error] An error occured during index rebuilding. There will be another attempt to check. The check interval after an error is 00:00:20.
Sitecore.Xdb.Collection.Search.Solr.Failures.SolrRebuildCoreNotFoundException: Collection name for alias: [xdb_rebuild] not found in Zookeeper configuration.
   at Sitecore.Xdb.Collection.Search.Solr.SolrCloudRebuildHelper.<LoadCollectionNames>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Sitecore.Xdb.Collection.Search.Solr.SolrCloudRebuildHelper.<SwapCores>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Sitecore.Xdb.Collection.Search.Solr.SolrIndexRebuilder.<CompleteRebuild>d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Sitecore.Xdb.Collection.Indexing.Rebuild.IndexRebuildFlow.<CompleteRebuild>d__28.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Sitecore.Xdb.Collection.Indexing.Rebuild.IndexRebuildFlow.<RunRebuild>d__25.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Sitecore.Xdb.Collection.Indexing.Rebuild.IndexRebuildFlow.RebuildStatusWatcher.<>c__DisplayClass5_0.<<Start>g__RunRebuildFlowCycle|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Sitecore.Xdb.Collection.Indexing.Rebuild.TaskExtension.<ExecuteWithInterval>d__0.MoveNext()

We have already uploaded configs to zookeeper and created xdb collections using the same. Are move missing anything here?


问:
Matplotlib: the x-tick labels I set overlap default labels
I am making a boxplot using matplotlib and want to set my own labels for the x-axis using this code:

```<code>plt.figure(figsize=(8,8))
plt.title("VJV vs SJV", fontsize = 15)
plt.xticks([1, 2], ['VJV', 'SJV'])
plt.boxplot([vjv["amount"], sjv["amount"]])
plt.grid()
plt.show();
</code>```

However, rather than replacing the default axis labels [1,2], it seems that my preferred axis labels ['VJV', 'SJV'] are placed on top of the default axis labels. See image.

How can I remove the default labels and only have my preferred axis labels?

Body:
I am making a boxplot using matplotlib and want to set my own labels for the x-axis using this code:

plt.figure(figsize=(8,8))
plt.title("VJV vs SJV", fontsize = 15)
plt.xticks([1, 2], ['VJV', 'SJV'])
plt.boxplot([vjv["amount"], sjv["amount"]])
plt.grid()
plt.show();

However, rather than replacing the default axis labels [1,2], it seems that my preferred axis labels ['VJV', 'SJV'] are placed on top of the default axis labels. See image.

How can I remove the default labels and only have my preferred axis labels?


问:
Cache evict on every DML operation
I have couple of findBy... methods in my spring application for instance

findById(int id)

findByName(String name)

findByCity(String city)

etc...

For every method I have a cache key like

```<code>1. person.id.<id_val> e.g person.id.1, person.id.2 ....
2. person.name.<name_val> e.g person.name.foo, person.name.bar ....
2. person.city.<city_val> e.g person.city.abc, person.city.xyz ....
</code>```

so, e.g:

```<code>Person p = {id = 1, name = "foo", city = "xyz"}

when invoking above methods
1. findById(int id)  id = 1                 // return p {id = 1, name = "foo", city = "xyz"}
2. findByName(String name) name = foo       // return p {id = 1, name = "foo", city = "xyz"}
3. findByCity(String city) city = xyz       // return p {id = 1, name = "foo", city = "xyz"}
</code>```

It is a Read Through cache i.e when data will be read from database I am populating data in cache.

Requirement:  When any DML operation (Insert, Update, Delete) operation is to be performed on Person object I need to evict the cache, not doing so will keep stale data in cache till it is auto flushed.if an update happens on city for user 1 and the new value is city = "pqr" then I need to evict data for all the keys else user will get stale data

Problem: As mentioned above I have couple of different cache keys so,
how should I find all the keys which are storing the data of                                person p{id = 1, name = "foo", city = "xyz"} and evict them?

Any help will be appreciated.

I have thought of reverse mapping of keys to maintain all the keys for particular Id like
person.id.1 = {person.name.foo, person.city.xyz}

and when on any DML operation on particular object use the id and find all the keys from cache and evict those.

It seems to be space and time intensive operation, so any better approach to do it?

Title: Cache evict on every DML operation

Body:
I have couple of findBy... methods in my spring application for instance

findById(int id)

findByName(String name)

findByCity(String city)

etc...

For every method I have a cache key like

1. person.id.<id_val> e.g person.id.1, person.id.2 ....
2. person.name.<name_val> e.g person.name.foo, person.name.bar ....
2. person.city.<city_val> e.g person.city.abc, person.city.xyz ....

so, e.g:

Person p = {id = 1, name = "foo", city = "xyz"}

when invoking above methods
1. findById(int id)  id = 1                 // return p {id = 1, name = "foo", city = "xyz"}
2. findByName(String name) name = foo       // return p {id = 1, name = "foo", city = "xyz"}
3. findByCity(String city) city = xyz       // return p {id = 1, name = "foo", city = "xyz"}

It is a Read Through cache i.e when data will be read from database I am populating data in cache.

Requirement:  When any DML operation (Insert, Update, Delete) operation is to be performed on Person object I need to evict the cache, not doing so will keep stale data in cache till it is auto flushed.if an update happens on city for user 1 and the new value is city = "pqr" then I need to evict data for all the keys else user will get stale data

Problem: As mentioned above I have couple of different cache keys so,
how should I find all the keys which are storing the data of                                person p{id = 1, name = "foo", city = "xyz"} and evict them?

Any help will be appreciated.

I have thought of reverse mapping of keys to maintain all the keys for particular Id like
person.id.1 = {person.name.foo, person.city.xyz}

and when on any DML operation on particular object use the id and find all the keys from cache and evict those.

It seems to be space and time intensive operation, so any better approach to do it?


问:
why do i get an @id instead of a whole object
Hello I am in the middle fixing a bug and whould like some outside eyes for some support.im using axios to retreive a class from my springboot tomcat server.the information is fine in the controller up to the return portion once it goes to my front end though thats where the problem occurs I get an object like this upon res.data {@id:'1'}.

my class

```<code>@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIdentityInfo(generator= JSOGGenerator.class)

@Getter
@Setter
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Entity
@Table(name = "gender")

public class Gender   implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;
    @Column(nullable = false)
    private String gender;
    @OneToMany(fetch=FetchType.LAZY, mappedBy="gender")

    private Set<User> users;

}
</code>```

the react page.

```<code>import React, { useState,memo,useEffect }from "react";
import axios from 'axios';
import JSOG from 'jsog';
import {decrypt} from "../../Util/jsogRetreival.js";
import Autocomplete from '../../Util/autocomplete';

let Gender=(props)=>{
    let[gender,setgender]=useState({});
   let[list,setList]=useState([]);
   let[error,setError]=useState("");
   let[currentValue,setCurrentValue]=useState("");
     let[fullList,setFullList]=useState([]);

    useEffect(() => {
        let getValue="";
        const fetchData = async () => {
            if(props.id!==-1){
            await axios.get(
            'http://localhost:8080/gender/getById/'+props.id)
               .then(res => {
                setgender(res.data);
               }).catch(
                function (error) {
                 console.log(error);
               });}
               else{
                await axios.get(
                    'http://localhost:8080/gender/getDummy')
                       .then(res => {
//
//where i pause my code and get the @id in res.data
//
//

                   let genderOf=decrypt(res.data);
                        let idontknow=JSOG.decode(res.data);
                        let fuck= JSOG.parse(idontknow);
                        setgender(res.data);
                       }).catch(
                        function (error) {
                         console.log(error);
                       });
               }
               let fromList=[];
               await axios.get(
                'http://localhost:8080/gender')
                   .then(res => {
                    if(res.data.length<1){

                    }
                    else{
                        fromList=decrypt(res.data);
                    }

                        setFullList(fromList);

                   }).catch(
                    function (error) {
                     console.log(error);
                   });
                    let newList=[];
                    let newListLink=[];
                    let ofList=fromList;
                    ofList.map((item)=>{
                        newList.push(item.gender);
                        newListLink.push(item.link);
                    });
                    setList(newList);
          }

          // call the function
          fetchData();

      });

      let onChange=(value,tag)=>{
        if(tag==='gender'){
            setCurrentValue(value);
            let newList=[];
            fullList.map((item)=>{
                if(item.gender.startsWith(value)){
                    newList.push(newList.push(item.gender));
                }
            });
            setList(newList);

        }
      }
    let handleSubmit=async(event) => {
        event.preventDefault();
        await axios.post(
            'http://localhost:8080/gender',gender)
               .then(res => {
                let errors=decrypt(res.data);
                setError(errors.genderError);
               }).catch(
                function (error) {
                 console.log(error);
               });
    };
    return (<div>
                <form action={handleSubmit} >
                    genderName:<Autocomplete list={list} onChangeValue={onChange}/>
                    <div>{error}</div>
                    <input type="submit" value="Submit" />
                </form>
            </div>);
}
export default Gender;
</code>```

Body:
Hello I am in the middle fixing a bug and whould like some outside eyes for some support.im using axios to retreive a class from my springboot tomcat server.the information is fine in the controller up to the return portion once it goes to my front end though thats where the problem occurs I get an object like this upon res.data {@id:'1'}.

my class

@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIdentityInfo(generator= JSOGGenerator.class)

@Getter
@Setter
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Entity
@Table(name = "gender")

public class Gender   implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;
    @Column(nullable = false)
    private String gender;
    @OneToMany(fetch=FetchType.LAZY, mappedBy="gender")

    private Set<User> users;

}

the react page.

import React, { useState,memo,useEffect }from "react";
import axios from 'axios';
import JSOG from 'jsog';
import {decrypt} from "../../Util/jsogRetreival.js";
import Autocomplete from '../../Util/autocomplete';

let Gender=(props)=>{
    let[gender,setgender]=useState({});
   let[list,setList]=useState([]);
   let[error,setError]=useState("");
   let[currentValue,setCurrentValue]=useState("");
     let[fullList,setFullList]=useState([]);

    useEffect(() => {
        let getValue="";
        const fetchData = async () => {
            if(props.id!==-1){
            await axios.get(
            'http://localhost:8080/gender/getById/'+props.id)
               .then(res => {
                setgender(res.data);
               }).catch(
                function (error) {
                 console.log(error);
               });}
               else{
                await axios.get(
                    'http://localhost:8080/gender/getDummy')
                       .then(res => {
//
//where i pause my code and get the @id in res.data
//
//

                   let genderOf=decrypt(res.data);
                        let idontknow=JSOG.decode(res.data);
                        let fuck= JSOG.parse(idontknow);
                        setgender(res.data);
                       }).catch(
                        function (error) {
                         console.log(error);
                       });
               }
               let fromList=[];
               await axios.get(
                'http://localhost:8080/gender')
                   .then(res => {
                    if(res.data.length<1){

                    }
                    else{
                        fromList=decrypt(res.data);
                    }

                        setFullList(fromList);

                   }).catch(
                    function (error) {
                     console.log(error);
                   });
                    let newList=[];
                    let newListLink=[];
                    let ofList=fromList;
                    ofList.map((item)=>{
                        newList.push(item.gender);
                        newListLink.push(item.link);
                    });
                    setList(newList);
          }

          // call the function
          fetchData();

      });

      let onChange=(value,tag)=>{
        if(tag==='gender'){
            setCurrentValue(value);
            let newList=[];
            fullList.map((item)=>{
                if(item.gender.startsWith(value)){
                    newList.push(newList.push(item.gender));
                }
            });
            setList(newList);

        }
      }
    let handleSubmit=async(event) => {
        event.preventDefault();
        await axios.post(
            'http://localhost:8080/gender',gender)
               .then(res => {
                let errors=decrypt(res.data);
                setError(errors.genderError);
               }).catch(
                function (error) {
                 console.log(error);
               });
    };
    return (

                <form action={handleSubmit} >
                    genderName:<Autocomplete list={list} onChangeValue={onChange}/>

{error}

                    <input type="submit" value="Submit" />
                </form>

);
}
export default Gender;


问:
Avoid position getting swapped after executing a query
I have a query where i find duplicated players. As we can see on the first screenshot. id = 1 and id = 2 has the same players which is equal to p1 and p2.  I have a query now where i can find duplicated players but the problem is the position of the results are getting swapped.

dbfiddle: https://dbfiddle.uk/SiEmTIex

Query i used:

```<code>select s.id, t.*
from users s
join (
    select LEAST(player1, player2) player1,
           GREATEST(player1, player2) player2,
           count(*) as qty
    from users
    group by 1, 2
    having count(*) > 1
    ) t on (t.player1, t.player2) IN ((s.player1, s.player2), (s.player2, s.player1))
</code>```

This is my current output:

My target output (My target here is least_player1 column data should be equals to player1. It goes the same for player2 and greatest_player2 :

Body:
I have a query where i find duplicated players. As we can see on the first screenshot. id = 1 and id = 2 has the same players which is equal to p1 and p2.  I have a query now where i can find duplicated players but the problem is the position of the results are getting swapped.

dbfiddle: https://dbfiddle.uk/SiEmTIex

Query i used:

select s.id, t.*
from users s
join (
    select LEAST(player1, player2) player1,
           GREATEST(player1, player2) player2,
           count(*) as qty
    from users
    group by 1, 2
    having count(*) > 1
    ) t on (t.player1, t.player2) IN ((s.player1, s.player2), (s.player2, s.player1))

This is my current output:

My target output (My target here is least_player1 column data should be equals to player1. It goes the same for player2 and greatest_player2 :


问:
How to detect USB mixer(audio) device but not mouse, Keyboard, or other USB devices in C++ code?
Currently, I am using a recording application which gets input from USB mixer device. I wrote a code that whenever the device is disconnected, the recording should be stopped and when it reconnects, it restarts the audio service and continues the recording.

But the problem is, it is stopping the recording if mouse, keyboard wire or even a pendrive is disconnected. The Guid I used in the code is below:

```<code>static const GUID GUID_DEVINTERFACE_USBSTOR = { 0xA5DCBF10L,
                                               0x6530,
                                               0x11D2,
                                               {0x90, 0x1F, 0x00, 0xC0, 0x4F, 0xB9, 0x51, 0xED} };
</code>```

Can someone tell me how to detect only the device which has audio input and exclude USBs like pendrive, mouse etc.?

Each customer might use different audio input device - which has 8 channels if it helps. So I can't hard code any specifications.

I am using Presonus USB mixer.

Body:
Currently, I am using a recording application which gets input from USB mixer device. I wrote a code that whenever the device is disconnected, the recording should be stopped and when it reconnects, it restarts the audio service and continues the recording.

But the problem is, it is stopping the recording if mouse, keyboard wire or even a pendrive is disconnected. The Guid I used in the code is below:

static const GUID GUID_DEVINTERFACE_USBSTOR = { 0xA5DCBF10L,
                                               0x6530,
                                               0x11D2,
                                               {0x90, 0x1F, 0x00, 0xC0, 0x4F, 0xB9, 0x51, 0xED} };

Can someone tell me how to detect only the device which has audio input and exclude USBs like pendrive, mouse etc.?

Each customer might use different audio input device - which has 8 channels if it helps. So I can't hard code any specifications.

I am using Presonus USB mixer.


问:
Finding "expired object delete markers" and removing them without using a lifecycle rule
My company platform (Netapp) does not allow to define a Lifecycle rule to automatically delete expired objects delete markers ("ExpiredObjectDeleteMarker": true) in a versioned bucket.

What would be the best query to retrieve all these expired objects delete markers and delete them by myself ? So basically --query "objects having ONLY delete markers entries"

PS : I can do it in two rounds with --query 'DeleteMarkers[?IsLatest==true]' and then checking that the Versions collection is empty but it would be more efficient to filter directly in the query.


问:
Fetching messages from ms teams
is it possible to write an application that fetch messages from microsoft teams without microsoft azure, only from localhost.

Thank you in advance.

Title: Fetching messages from ms teams


问:
Several treemap plots in R: how to fix location of a category
I am trying to make several treemaps with different datasets but with the same categories (same groups). I would like the colors to be homogeneous between plots so I wrote (vColor="group1"), but I also want my different categories to be located at the same place of the treemaps. For instance if in the first treemap my group 1 is on top left, I would like it to be on top left of my second treemap. Does anyone have an idea please?

I did not find any solution.


问:
how to prevent gspread_dataframe.get_as_dataframe from reading #N/A with error messages
I'm using gspread_dataframe to read data in a Google Sheet to a pandas DataFrame. The Google Sheet has a #N/A with an error message. When reading into a DataFrame it brings in the error message:

import pandas as pd
import gspread
from gspread_dataframe import get_as_dataframe, set_with_dataframe

credentials = ...
gsheet_client = gspread.service_account_from_dict(client_secrets)

gsheet_connection = gsheet_client.open("gsheet_name")
worksheet = gsheet_connection.worksheet("tab_name")

df = get_as_dataframe(
    worksheet,
    evaluate_formulas=True,
    parse_dates=True,
    usecols=list(range(1,21)),
    skiprows=8,
    na_values=["#N/A"],
)
```
```60     #N/A (Did not find value '45306' in MATCH eval...
61     #N/A (Did not find value '45313' in MATCH eval...
62     #N/A (Did not find value '45320' in MATCH eval...
63     #N/A (Did not find value '45327' in MATCH eval...
64     #N/A (Did not find value '45334' in MATCH eval...
                             ...
274                                                  NaN
275                                                  NaN
276                                                  NaN
277                                                  NaN
278                                                  NaN
Name: COL1, Length: 219, dtype: object
```
<p>Similar situation with <code>#DIV/0!</code>:</p>
```60     #DIV/0! (Function DIVIDE parameter 2 cannot be...
61     #DIV/0! (Function DIVIDE parameter 2 cannot be...
62     #DIV/0! (Function DIVIDE parameter 2 cannot be...
63     #DIV/0! (Function DIVIDE parameter 2 cannot be...
64     #DIV/0! (Function DIVIDE parameter 2 cannot be...
                             ...
274                                                  NaN
275                                              Directo
276                                                  NaN
277                                                  NaN
278                                                  NaN
Name: COL2, Length: 219, dtype: object
```

What is the best way to convert anything starting with #N/A or #DIV/0! to NaN? If we can do it in the get_as_dataframe() function that would be great e.g. via na_values=lambda x: ...?

Body:
I'm using gspread_dataframe to read data in a Google Sheet to a pandas DataFrame. The Google Sheet has a #N/A with an error message. When reading into a DataFrame it brings in the error message:

import pandas as pd
import gspread
from gspread_dataframe import get_as_dataframe, set_with_dataframe

credentials = ...
gsheet_client = gspread.service_account_from_dict(client_secrets)

gsheet_connection = gsheet_client.open("gsheet_name")
worksheet = gsheet_connection.worksheet("tab_name")

df = get_as_dataframe(
    worksheet,
    evaluate_formulas=True,
    parse_dates=True,
    usecols=list(range(1,21)),
    skiprows=8,
    na_values=["#N/A"],
)

60     #N/A (Did not find value '45306' in MATCH eval...
61     #N/A (Did not find value '45313' in MATCH eval...
62     #N/A (Did not find value '45320' in MATCH eval...
63     #N/A (Did not find value '45327' in MATCH eval...
64     #N/A (Did not find value '45334' in MATCH eval...
                             ...
274                                                  NaN
275                                                  NaN
276                                                  NaN
277                                                  NaN
278                                                  NaN
Name: COL1, Length: 219, dtype: object

Similar situation with #DIV/0!:

60     #DIV/0! (Function DIVIDE parameter 2 cannot be...
61     #DIV/0! (Function DIVIDE parameter 2 cannot be...
62     #DIV/0! (Function DIVIDE parameter 2 cannot be...
63     #DIV/0! (Function DIVIDE parameter 2 cannot be...
64     #DIV/0! (Function DIVIDE parameter 2 cannot be...
                             ...
274                                                  NaN
275                                              Directo
276                                                  NaN
277                                                  NaN
278                                                  NaN
Name: COL2, Length: 219, dtype: object

What is the best way to convert anything starting with #N/A or #DIV/0! to NaN? If we can do it in the get_as_dataframe() function that would be great e.g. via na_values=lambda x: ...?


问:
Method stuck in loop after using ServerDataSource onChanged() angular
I'm using ServerDataSource to load data to smart table, but somehow method updateColumnsAndMetadataFields() got stuck in loop and table keeps reloading.

Code from service:

```<code>getDocumentsByType(typeId: number, filterDTO: FilterDTO): ServerDataSource {
    return new ServerDataSource(this.http, {
      endPoint: //my api route,
      pagerPageKey: 'page',
      pagerLimitKey: 'limit',
      totalKey: 'x-total-count'
    });
  }
</code>```

code from components.ts:

```<code>    this.documents = [];
    var filterDTO = new FilterDTO();
    filterDTO.limit = 5;
    filterDTO.page = 1;

    this.serverSource = this.documentsService.getDocumentsByType(this.typeId, filterDTO);
    this.serverSource.onChanged().subscribe((data:any) => {
      this.documents = data.elements;
      if(data.action == 'refresh') {
        this.serverSource.getElements().then((data) => {
          this.updateColumnsAndMetadataFields(); <--- //method for filling table data that gets stuck in loop

          this.checkForType(data);

          data.forEach(doc => {
            console.log(doc.id);
            doc.flows = doc.flows.sort((a,b) => { return b.id > a.id; });
          });
        })
      }
</code>```

html code:

```<code><ng2-smart-table [settings]="settings" [source]="serverSource"
              (userRowSelect)="onRowClick($event)">
</ng2-smart-table>
</code>```

Body:
I'm using ServerDataSource to load data to smart table, but somehow method updateColumnsAndMetadataFields() got stuck in loop and table keeps reloading.

Code from service:

getDocumentsByType(typeId: number, filterDTO: FilterDTO): ServerDataSource {
    return new ServerDataSource(this.http, {
      endPoint: //my api route,
      pagerPageKey: 'page',
      pagerLimitKey: 'limit',
      totalKey: 'x-total-count'
    });
  }

code from components.ts:

    this.documents = [];
    var filterDTO = new FilterDTO();
    filterDTO.limit = 5;
    filterDTO.page = 1;

    this.serverSource = this.documentsService.getDocumentsByType(this.typeId, filterDTO);
    this.serverSource.onChanged().subscribe((data:any) => {
      this.documents = data.elements;
      if(data.action == 'refresh') {
        this.serverSource.getElements().then((data) => {
          this.updateColumnsAndMetadataFields(); <--- //method for filling table data that gets stuck in loop

          this.checkForType(data);

          data.forEach(doc => {
            console.log(doc.id);
            doc.flows = doc.flows.sort((a,b) => { return b.id > a.id; });
          });
        })
      }

html code:

<ng2-smart-table [settings]="settings" [source]="serverSource"
              (userRowSelect)="onRowClick($event)">
</ng2-smart-table>


问:
Kotlin: How can I crop Image with 4 points (coordinates)
I want to crop image with 4 points
Four points mean (x1, y1), (x2, y2), (x3, y3), (x4, y4).

In Swift(iOS), I can do that with below code.

```<code>func pointToRect(pointsArray: [CGPoint]) -> CGRect {
    var greatestXValue = pointsArray[0].x
    var greatestYValue = pointsArray[0].y
    var smallestXValue = pointsArray[0].x
    var smallestYValue = pointsArray[0].y
    for point in pointsArray {
        greatestXValue = max(greatestXValue, point.x);
        greatestYValue = max(greatestYValue, point.y);
        smallestXValue = min(smallestXValue, point.x);
        smallestYValue = min(smallestYValue, point.y);
    }
    let origin = CGPoint(x: smallestXValue, y: smallestYValue)
    let size = CGSize(width: greatestXValue - smallestXValue, height: greatestYValue - smallestYValue)
    return CGRect(origin: origin, size: size)
}

let eyesRect = pointToRect(pointsArray: [points[33], points[5], points[46], points[28]])

func cropped(rect: CGRect) -> UIImage? {
    UIGraphicsBeginImageContext(rect.size)
    let context = UIGraphicsGetCurrentContext()
    let drawRect = CGRect(x: -rect.origin.x, y: -rect.origin.y,
                          width: self.size.width, height: self.size.height)

    context?.clip(to: CGRect(x: 0, y: 0,
                             width: rect.size.width, height: rect.size.height))

    self.draw(in: drawRect)

    let subImage = UIGraphicsGetImageFromCurrentImageContext()

    UIGraphicsEndImageContext()
    return subImage
}

croppedFaceImage = image.cropped(rect: eyesRect)
</code>```

I have originalImage, 4 points coordinates.
How can I crop them and get cropped image.

Thank you for reading it.

Body:
I want to crop image with 4 points
Four points mean (x1, y1), (x2, y2), (x3, y3), (x4, y4).

In Swift(iOS), I can do that with below code.

func pointToRect(pointsArray: [CGPoint]) -> CGRect {
    var greatestXValue = pointsArray[0].x
    var greatestYValue = pointsArray[0].y
    var smallestXValue = pointsArray[0].x
    var smallestYValue = pointsArray[0].y
    for point in pointsArray {
        greatestXValue = max(greatestXValue, point.x);
        greatestYValue = max(greatestYValue, point.y);
        smallestXValue = min(smallestXValue, point.x);
        smallestYValue = min(smallestYValue, point.y);
    }
    let origin = CGPoint(x: smallestXValue, y: smallestYValue)
    let size = CGSize(width: greatestXValue - smallestXValue, height: greatestYValue - smallestYValue)
    return CGRect(origin: origin, size: size)
}

let eyesRect = pointToRect(pointsArray: [points[33], points[5], points[46], points[28]])

func cropped(rect: CGRect) -> UIImage? {
    UIGraphicsBeginImageContext(rect.size)
    let context = UIGraphicsGetCurrentContext()
    let drawRect = CGRect(x: -rect.origin.x, y: -rect.origin.y,
                          width: self.size.width, height: self.size.height)

    context?.clip(to: CGRect(x: 0, y: 0,
                             width: rect.size.width, height: rect.size.height))

    self.draw(in: drawRect)

    let subImage = UIGraphicsGetImageFromCurrentImageContext()

    UIGraphicsEndImageContext()
    return subImage
}

croppedFaceImage = image.cropped(rect: eyesRect)

I have originalImage, 4 points coordinates.
How can I crop them and get cropped image.

Thank you for reading it.


问:
Ranking Feature Importance in a Neural Network for a Classification Problem
I have a neural network model that applied to a classification problem. I searched a lot on web but I could not find any document about how calculate importances of features for such a model. Is there anyone can help for this issue?</p>


问:
Cannot run JavaFX JAR built using Maven from IntelliJ
I have been trying to set up a JavaFX project to prepare for a school project and I wanted to use Maven to make it easier to share it as it removes the need for configuration as long as the pom.xml file is correctly written.

I can compile the project, run it with javafx:run but when I use the maven jar plugin to generate a JAR I get the following error trying to run it :

```<code>Error: Could not find or load main class org.openjfx.App
Caused by: java.lang.NoClassDefFoundError: javafx/application/Application
</code>```

I don't understand why it's not finding the JavaFX classes as I do have the JavaFX Maven plugin as well as the javafx-controls and javafx-fxml dependencies added in the pom.xml

Here's the full file for reference

```<code><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>org.openjfx</groupId>
    <artifactId>hellofx</artifactId>
    <version>1.0-SNAPSHOT</version>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.release>11</maven.compiler.release>
        <javafx.version>19</javafx.version>
        <javafx.maven.plugin.version>0.0.8</javafx.maven.plugin.version>
    </properties>
    <dependencies>
        <dependency>
            <groupId>org.openjfx</groupId>
            <artifactId>javafx-controls</artifactId>
            <version>${javafx.version}</version>
        </dependency>
        <dependency>
            <groupId>org.openjfx</groupId>
            <artifactId>javafx-fxml</artifactId>
            <version>${javafx.version}</version>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>
                <configuration>
                    <release>${maven.compiler.release}</release>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.openjfx</groupId>
                <artifactId>javafx-maven-plugin</artifactId>
                <version>${javafx.maven.plugin.version}</version>
                <configuration>
                    <mainClass>org.openjfx.App</mainClass>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>3.0.2</version>
                <configuration>
                    <archive>
                        <manifest>
                            <mainClass>org.openjfx.App</mainClass>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
</code>```

Does anyone know what I'm missing for the JAR to include the JavaFX classes ? I thought adding the maven plugin was enough.

Thank you

Body:
I have been trying to set up a JavaFX project to prepare for a school project and I wanted to use Maven to make it easier to share it as it removes the need for configuration as long as the pom.xml file is correctly written.

I can compile the project, run it with javafx:run but when I use the maven jar plugin to generate a JAR I get the following error trying to run it :

Error: Could not find or load main class org.openjfx.App
Caused by: java.lang.NoClassDefFoundError: javafx/application/Application

I don't understand why it's not finding the JavaFX classes as I do have the JavaFX Maven plugin as well as the javafx-controls and javafx-fxml dependencies added in the pom.xml

Here's the full file for reference

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>org.openjfx</groupId>
    <artifactId>hellofx</artifactId>
    <version>1.0-SNAPSHOT</version>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.release>11</maven.compiler.release>
        <javafx.version>19</javafx.version>
        <javafx.maven.plugin.version>0.0.8</javafx.maven.plugin.version>
    </properties>
    <dependencies>
        <dependency>
            <groupId>org.openjfx</groupId>
            <artifactId>javafx-controls</artifactId>
            <version>${javafx.version}</version>
        </dependency>
        <dependency>
            <groupId>org.openjfx</groupId>
            <artifactId>javafx-fxml</artifactId>
            <version>${javafx.version}</version>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>
                <configuration>
                    <release>${maven.compiler.release}</release>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.openjfx</groupId>
                <artifactId>javafx-maven-plugin</artifactId>
                <version>${javafx.maven.plugin.version}</version>
                <configuration>
                    <mainClass>org.openjfx.App</mainClass>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>3.0.2</version>
                <configuration>
                    <archive>
                        <manifest>
                            <mainClass>org.openjfx.App</mainClass>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>

Does anyone know what I'm missing for the JAR to include the JavaFX classes ? I thought adding the maven plugin was enough.

Thank you