Forward slash removed from URL when following redirects

Expected behavior
JMeter should be able to follow redirects that contain full URLS as route parameters. For instance, a HTTP 302 such as
Location: https://example.com/host/https://test.com

should make JMeter go to the actual URL "https://example.com/host/https://test.com". JMeter is stripping a slash after /host/https: and ends up following https://example.com/host/https:/test.com. When the backend server at example.com receives the route parameter for host, it gets https:/test.com instead of the expected https://test.com
Actual behavior
jmeter.log file attached: jmeter.log
JTL file attached: test.txt
JMX file attached: testjmx.txt
Steps to reproduce the problem
The Bug
When following redirects which contain https:// in the URL's path like the example below:
https://ela1.s-ela.elmodev.com/oauth2-client/anon/check-authcode/host/https://ela1.elmodev.com/?state={redacted}&code={redacted}
where the path contains the text host/https://ela1.elmodev.com/
JMeter strips a slash after "https:" and the actual call it makes is
2023-10-24 15:46:48,795 DEBUG o.a.h.wire: http-outgoing-3 >> "GET /oauth2-client/anon/check-authcode/host/https:/ela1.elmodev.com/?state={redacted}&code={redacted} HTTP/1.1[\r][\n]"

host/https://ela1.elmodev.com/ is converted into host/https:/ela1.elmodev.com/ which is a malformed URL.
You can see that in the the logs at "ALL" level, collected from GUI below as well:
2023-10-24 15:46:48,793 DEBUG o.a.h.i.c.PoolingHttpClientConnectionManager: Connection [id: 2][route: {s}->https://ela1.elmodev.com:443][state: Login TMS Thread Group 1-1] can be kept alive indefinitely
2023-10-24 15:46:48,793 DEBUG o.a.h.i.c.DefaultManagedHttpClientConnection: http-outgoing-2: set socket timeout to 0
2023-10-24 15:46:48,793 DEBUG o.a.h.i.c.PoolingHttpClientConnectionManager: Connection released: [id: 2][route: {s}->https://ela1.elmodev.com:443][state: Login TMS Thread Group 1-1][total available: 1; route allocated: 1 of 2; total allocated: 1 of 20]
2023-10-24 15:46:48,793 DEBUG o.a.j.p.h.s.HTTPHC4Impl: ResponseHeadersSize=635 Content-Length=5 Total=640
2023-10-24 15:46:48,793 DEBUG o.a.j.p.h.s.HTTPSamplerBase: Initial location: https://ela1.s-ela.elmodev.com/oauth2-client/anon/check-authcode/host/https://ela1.elmodev.com/?state=redacted&code=redacted
2023-10-24 15:46:48,793 DEBUG o.a.j.p.h.s.HTTPSamplerBase: Location after /. and space transforms: https://ela1.s-ela.elmodev.com/oauth2-client/anon/check-authcode/host/https://ela1.elmodev.com/?state=redacted&code=redacted
2023-10-24 15:46:48,793 DEBUG o.a.j.p.h.s.HTTPSamplerBase: Location as URL: https://ela1.s-ela.elmodev.com/oauth2-client/anon/check-authcode/host/https://ela1.elmodev.com/?state=redacted&code=redacted
2023-10-24 15:46:48,793 DEBUG o.a.j.p.h.s.HTTPHC4Impl: Start : sample https://ela1.s-ela.elmodev.com/oauth2-client/anon/check-authcode/host/https://ela1.elmodev.com/?state=redacted&code=redacted method GET followingRedirect true depth 0
2023-10-24 15:46:48,793 DEBUG o.a.j.p.h.s.HTTPHC4Impl: Reusing the HttpClient: @660347056 https://ela1.s-ela.elmodev.com
2023-10-24 15:46:48,793 DEBUG o.a.j.p.h.c.HC4CookieHandler: Found 1 cookies for https://ela1.s-ela.elmodev.com/oauth2-client/anon/check-authcode/host/https://ela1.elmodev.com/?state=redacted&code={redacted}
2023-10-24 15:46:48,794 DEBUG o.a.j.p.h.s.HTTPHC4Impl: Found user token:Login TMS Thread Group 1-1 as JMeter variable:__jmeter.U_T__, storing it in HttpContext
2023-10-24 15:46:48,794 DEBUG o.a.h.c.p.RequestAddCookies: CookieSpec selected: default
2023-10-24 15:46:48,794 DEBUG o.a.h.c.p.RequestAddCookies: Unsupported cookie policy: default
2023-10-24 15:46:48,794 DEBUG o.a.h.c.p.RequestAuthCache: Auth cache not set in the context
2023-10-24 15:46:48,794 DEBUG o.a.h.i.c.PoolingHttpClientConnectionManager: Connection request: [route: {s}->https://ela1.s-ela.elmodev.com:443][state: Login TMS Thread Group 1-1][total available: 1; route allocated: 1 of 2; total allocated: 1 of 20]
2023-10-24 15:46:48,794 DEBUG o.a.h.i.c.PoolingHttpClientConnectionManager: Connection leased: [id: 3][route: {s}->https://ela1.s-ela.elmodev.com:443][state: Login TMS Thread Group 1-1][total available: 0; route allocated: 1 of 2; total allocated: 1 of 20]
2023-10-24 15:46:48,794 DEBUG o.a.h.i.c.DefaultManagedHttpClientConnection: http-outgoing-3: set socket timeout to 0
2023-10-24 15:46:48,794 DEBUG o.a.h.i.e.MainClientExec: Executing request GET /oauth2-client/anon/check-authcode/host/https:/ela1.elmodev.com/?state=redacted&code={redacted} HTTP/1.1
2023-10-24 15:46:48,794 DEBUG o.a.h.i.e.MainClientExec: Target auth state: UNCHALLENGED
2023-10-24 15:46:48,794 DEBUG o.a.h.i.e.MainClientExec: Proxy auth state: UNCHALLENGED
2023-10-24 15:46:48,794 DEBUG o.a.h.headers: http-outgoing-3 >> GET /oauth2-client/anon/check-authcode/host/https:/ela1.elmodev.com/?state=redacted&code=redacted HTTP/1.1
2023-10-24 15:46:48,794 DEBUG o.a.h.headers: http-outgoing-3 >> Connection: keep-alive
2023-10-24 15:46:48,794 DEBUG o.a.h.headers: http-outgoing-3 >> Cookie: PHPSESSID=ebf36fee4874b757a2306915ee4746f7
2023-10-24 15:46:48,794 DEBUG o.a.h.headers: http-outgoing-3 >> Host: ela1.s-ela.elmodev.com
2023-10-24 15:46:48,794 DEBUG o.a.h.headers: http-outgoing-3 >> User-Agent: Apache-HttpClient/4.5.14 (Java/<IP_ADDRESS>)
2023-10-24 15:46:48,795 DEBUG o.a.h.wire: http-outgoing-3 >> "GET /oauth2-client/anon/check-authcode/host/https:/ela1.elmodev.com/?state=redacted&code=redacted HTTP/1.1[\r][\n]"

I have attached the JMX, JTL and jmeter.log files below but wasn't able to spot a malformed URL in the file contents but the behavior is the same in both GUI and non-GUI modes.
JMeter Version
5.6.2
Java Version
openjdk version "<IP_ADDRESS>" 2023-08-24
OS Version
No response

Thanks for your response. We don't have control of the URL. However, I worked around the issue by going to the "Advanced" tab of the HTTP Request sampler, and changing the Client implementation from the default "HTTPClient4" to "Java". Even though I am not blocked by this ticket, I'd say the "HTTPClient4" should behave the same as the "Java" implementation.


fix SigUseDefault to match ALPM_SIG_USE_DEFAULT

This reflects upstream's new value for this constant (see
https://git.archlinux.org/pacman.git/tree/lib/libalpm/alpm.h#n207)
which is necessary to prevent an overflow on 32-bit builds (rarer though
they may be).

True, related with https://github.com/Jguer/yay/issues/435
Thanks for the fix, this has just closed an issue on yay


foremost.conf missing

The file /usr/local/etc/foremost.conf  is missing.  This version of the file has additional signatures such as sigs for prefetch.

Fixed by https://github.com/sans-dfir/sift-saltstack/commit/1b16d7924ad67852e2d4b7b715376e742c37d9c3


Compiling with --noconsole option causes crash

I used the installation instructions for creating a self-contained executable using pyinstaller, and confirmed that this works.  However, the executable runs in a console, and closing the console window unfortunately also eliminates the systray icon.  Unfortunately, closing the console is easy to do by accident, and in addition, the console creates a taskbar button that takes up valuable space in the taskbar.
I've attempted to compile an executable that does not have a console, using the --noconsole option, as follows:
pyinstaller --noconsole --onefile emailproxy.py --hidden-import timeago.locales.en
However, running the resulting executable produces the following run-time error:

The full text of the error message is shown below.
Traceback (most recent call last):
  File "emailproxy.py", line 74, in <module>
  File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module
  File "webview\__init__.py", line 22, in <module>
  File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module
  File "webview\http.py", line 1, in <module>
  File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module
  File "bottle.py", line 73, in <module>
AttributeError: 'NoneType' object has no attribute 'write'

Is there any way to run the proxy (in Windows 10) without the console?

Thanks for reporting this. I can replicate the issue, but it is related to this change in PyInstaller 5.7.0, and is caused by pywebview not the proxy. There is an explanation of the reason in this issue on a different project. In summary, PyInstaller has changed the way that stdout and stderr are handled in --noconsole mode on Windows. I added a bit of context to an existing pywebview issue; hopefully this can be resolved.
In the meantime, downgrade your version of PyInstaller to fix this: python -m pip install pyinstaller==5.6.2 (or use --no-gui mode in the proxy).

I also tried pythonw emailproxy.py but this failed silently (no systray icon).

Where are you running that pythonw command from? For me, Command Prompt works fine, but in PowerShell I need to redirect/suppress the output streams (e.g., pythonw emailproxypy *>$null).
Incidentally, if you use the proxy's Start at Login option it will generate a single file in shell:startup that you can click to launch the proxy if that is what you're primarily looking for here.

Yes, --no-gui suppresses the systray icon, hence why it also fixes this GUI-related issue. Downgrading PyInstaller will achieve what you want here – it may not be a viable option forever, but I suspect the core issue will be fixed via pywebview well before that becomes a problem.

Pywebview's author has already proposed a fix for this – please could you test by installing the branch via python3.7 -m pip install https://github.com/r0x0r/pywebview/archive/logwriter-bottle.zip and let me know whether this resolves the issue?

I recently reported a related issue to pywebview and proposed a fix that has now been merged (see the pywebview report for details).
I will leave this issue open until it is possible to pin a specific released version of pywebview in the proxy's requirements, but until then it can be resolved by force installing the fixed version: python -m pip install git+https://github.com/r0x0r/pywebview.git


Uncaught TypeError: this.resolveConnectionPromise is not a function

Bryant closed the connection
Robert and I disconnected
Bryant Opened a connection
Robert was able to join
I got a notification that it failed to join
I tried to connect again and saw this

Atom: 1.22.0-dev-006ebc744 x64
Electron: 1.6.9
OS: Microsoft Windows 10 Pro
Thrown From: real-time package 0.1.0
Stack Trace
Uncaught TypeError: this.resolveConnectionPromise is not a function
At C:\Users\bene\.atom\packages\real-time\node_modules\@atom\real-time-client\lib\star-overlay-network.js:203

TypeError: this.resolveConnectionPromise is not a function
    at StarOverlayNetwork.receiveConnectionAck (/packages/real-time/node_modules/@atom/real-time-client/lib/star-overlay-network.js:203:10)
    at StarOverlayNetwork.receive (/packages/real-time/node_modules/@atom/real-time-client/lib/star-overlay-network.js:167:12)
    at Function.module.exports.Emitter.simpleDispatch (/packages/real-time/node_modules/event-kit/lib/emitter.js:25:14)
    at Emitter.module.exports.Emitter.emit (/packages/real-time/node_modules/event-kit/lib/emitter.js:141:28)
    at PeerPool.didReceiveMessage (/packages/real-time/node_modules/@atom/real-time-client/lib/peer-pool.js:90:18)
    at PeerConnection.finishReceiving (/packages/real-time/node_modules/@atom/real-time-client/lib/peer-connection.js:201:10)
    at PeerConnection.receive (/packages/real-time/node_modules/@atom/real-time-client/lib/peer-connection.js:192:14)
    at RTCDataChannel.channel.onmessage (/packages/real-time/node_modules/@atom/real-time-client/lib/peer-connection.js:105:47)

Commands
  3x -7:29.3.0 core:move-down (input.hidden-input)
  4x -7:28.4.0 editor:newline (input.hidden-input)
     -5:04.8.0 tabs:split-right (div.title)
     -2:59.4.0 command-palette:toggle (div.package-detail.panels-item)
     -2:58.1.0 core:confirm (input.hidden-input)
     -2:58.1.0 real-time:join-portal (div.package-detail.panels-item)
     -2:57.7.0 core:paste (input.hidden-input)
     -2:56.9.0 core:undo (input.hidden-input)
     -2:53.7.0 core:confirm (input.hidden-input)
     -2:11.3.0 command-palette:toggle (div.package-detail.panels-item)
     -2:10.5.0 core:confirm (input.hidden-input)
     -2:10.5.0 real-time:join-portal (div.package-detail.panels-item)
     -2:05.3.0 command-palette:toggle (div.package-detail.panels-item)
     -2:04.8.0 core:confirm (input.hidden-input)
     -2:04.8.0 real-time:join-portal (div.package-detail.panels-item)
     -2:04.0 core:confirm (input.hidden-input)

Non-Core Packages
advanced-open-file 0.16.6
atom-beautify 0.30.5
atom-dark-fusion-syntax 2.2.0
atom-ide-ui 0.1.11
atom-material-syntax 1.0.6
atom-material-ui undefined
autocomplete-emojis 2.5.0
busy-signal 1.4.3
chester-atom-syntax 0.3.0
chestnut-light-atom-syntax 0.2.1
color-picker 2.2.5
editor-stats 0.17.0
fizzy 0.21.0
golden-ratio 0.3.0
hey-pane 1.0.0
highlight-selected 0.13.1
honor-altgraph 0.1.0
intentions 1.1.5
language-latex 1.1.1
language-markdown 0.25.1
latex 0.46.0
less-than-slash 0.17.0
linter 2.2.0
linter-js-standard 4.0.0
linter-ui-default 1.6.8
markdown-pdf 1.5.4
minimap 4.29.6
minimap-autohider 1.5.3
minimap-find-and-replace 4.5.2
minimap-highlight-selected 4.6.1
nebula-syntax 0.4.4
nebula-ui 0.6.0
no-caffeine-syntax 0.18.1
nucleus-dark-ui 0.12.3
pastel-jelly-syntax 0.2.0
php-cs-fixer 4.1.0
pigments 0.40.2
platformio-ide-terminal 2.5.5
preview-inline 1.4.7
real-time 0.1.0
remote-edit 1.9.0
seti-syntax 1.1.3
seti-ui 1.9.0
Sublime-Style-Column-Selection 1.7.4
tab-title 0.3.5
toggler 0.3.0
vim-mode-plus 1.3.3
zentabs 0.8.8

I realize this is closed; but should it be? Just got the error this morning on OSX.

Thanks to @robjac for opening https://github.com/atom/teletype/issues/369 to track the most recent incarnation of the "this.resolveConnectionPromise is not a function" problem.


Add async hook to RouterHook and provide props as argument

Purpose of this PR
Pass entire props object to router.onUpdate hook.
Modifications

runCallbacksAsync now can be used on client: it uses promises to defer execution of callbacks instead of Meteor.defer
add router.onUpdate.async to avoid breaking changes by changing signature of router.onUpdate

Why I submitted this PR
Ok, this may seem some trivial changes, but I'll try to explain why I needed them and why I think they can be useful.
By default router.onUpdate hook is called everytime the current Vulcan route changes. Note the importance of it being the Vulcan route: it won't be called between route changes of the same route definition. For example, route changes between the same route but with different parameters won't trigger the router.onUpdate.
To make this to happen is quite straight forward (and didn't need any changes to the Vulcan's code): just replace the RouterHook component with itself and decorate it with the withRouter HOC:
import { replaceComponent, getRawComponent } from 'meteor/vulcan:core';
import { withRouter } from 'react-router';

replaceComponent(
  'RouterHook',
  getRawComponent('RouterHook'),
  withRouter,
);

Now it will trigger for each actual route change, because withRouter will inject some props that will trigger a rerender.
The problem now is that we cannot access those props from router.onUpdate callbacks because they are not passed as arguments. And in my case, I wanted to acces the current route's parameters. With this PR, it can be done:
import { addCallback } from 'meteor/vulcan:core';

addCallback(
  'router.onUpdate.async',
  // eslint-disable-next-line prefer-arrow-callback
  function callbackName({currentRoute, params, ...otherProps }) {
    // do something with `params`
  },
);

I hope I explained myself clearly and that you find that it makes sense.

That makes sense, I think. But:

runCallbacksAsync now can be used on client: it uses promises to defer execution of callbacks instead of Meteor.defer

Are we sure that this won't affect the behavior of current async callbacks on the server? Potentially it could be a change with a pretty big impact. I just don't know how Meteor.defer works behind the scenes compared to Promises. But if you've tried it and it works then that's probably ok?

If you want, we could use Meteor.defer on the server and regular promises on the client just to be sure.

Yeah I think that's a safest way for now. Maybe add a // TODO: find out if we can safely use promises on the server, too comment in there and come back to it later.

Hi @SachaG! Sorry, I totally forgot about this.
Added a commit in order to use Meteor.defer as we discussed. Note that a Promise is being returned that resolves an array with every callback return: this is done to allow callbacks to optionally return a Promise themselves so the invoker of the hook can await them.

I forgot about this too… I think if you've tested this code we can go ahead and merge it, but just a note that routing will change a lot with the next update since we're moving to React Router 4.

Sure @SachaG, I'm using this in production with a quite complex app and it seems to work fine.
Anyway, the changes in those PR are completely opt-in:

async callbacks can now return a promise so the caller code waits for them (so for example, you can run callbacks in paralel and the caller code will be waiting). If they don't return anything, then the callbacks will run in a detached way (caller code will continue without waiting for them, as it was until now)
async router hook can be used to execute parallel computations when a route has changed (and having access to the route's props)

With that said, having this merged would be great, since it forces me and my team to have a local Vulcan versions with this code, which makes setup and mantainability a lot harder.

Sounds good, I'll merge it then!

Merged to master :/ I'm merging master into devel;
Is there a way to avoid PRs to master automatically?

Sorry, my mistake... I did not see that I was creating the PR into master :\


Remove unused and slow 'protocol implementations' analysis

We were walking the entire AST for all source files once per SIL module -- which is still once per source file in batch mode, so its quadratic. And the results of the analysis were unused, so nuke it.
Also, remove some code from the SIL linker that was completely dead.

@swift-ci Please smoke test


Update appcast checksum for casks

Thank you for the contribution. However, there is no point in updating those because the appcast checksums are not used anywhere yet. You can update them, of course, for example when you upgrade the cask version, but technically there is no point in that.
If the appcast checksum verification will be implemented, by that time many of those will become outdated, and there will be a need to change most of them again.

We also wouldn't merge a commit that touches so many files at once. Ideally commits should only contain changes to a single file. The case for multiple files is when your updating casks which are either slighty different/interrelated versions of the same software, or they should all be updated at the same time i.e navicat

Thank you anyway, @linc01n, but closing on account of what @victorpopkov and @fanquake already pointed out.

Understood. Thanks everyone.


Java Maven JDK 17 not supported

Hi, I'm making java (Maven) project that uses the latest JDK 17. I've set up this workflow, but every time it runs it exits after a few seconds. It seems that the problem is using JDK 17.  Here's the log:
  [2021-11-21 00:14:48] [autobuild] [INFO] Compiling 14 source files to /home/runner/work/Atosiak/Atosiak/target/classes
  [2021-11-21 00:14:49] [autobuild] [INFO] ------------------------------------------------------------------------
  [2021-11-21 00:14:49] [autobuild] [INFO] BUILD FAILURE
  [2021-11-21 00:14:49] [autobuild] [INFO] ------------------------------------------------------------------------
  [2021-11-21 00:14:49] [autobuild] [INFO] Total time:  12.623 s
  [2021-11-21 00:14:49] [autobuild] [INFO] Finished at: 2021-11-21T00:14:49Z
  [2021-11-21 00:14:49] [autobuild] [INFO] ------------------------------------------------------------------------
  Error: 1-21 00:14:49] [autobuild] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project Atosiak: Fatal error compiling: error: invalid target release: 17 -> [Help 1]
  [2021-11-21 00:14:49] [autobuild] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project Atosiak: Fatal error compiling
  [2021-11-21 00:14:49] [autobuild]     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
  [2021-11-21 00:14:49] [autobuild]     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
  [2021-11-21 00:14:49] [autobuild]     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
  [2021-11-21 00:14:49] [autobuild]     at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
  [2021-11-21 00:14:49] [autobuild]     at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)

And final lines:
  Error: 1-21 00:14:49] [autobuild] [ERROR]
  Error: 1-21 00:14:49] [autobuild] [ERROR] Re-run Maven using the -X switch to enable full debug logging.
  Error: 1-21 00:14:49] [autobuild] [ERROR]
  Error: 1-21 00:14:49] [autobuild] [ERROR] For more information about the errors and possible solutions, please read the following articles:
  Error: 1-21 00:14:49] [autobuild] [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
  Error: 1-21 00:14:49] [ERROR] Spawned process exited abnormally (code 1; tried to run: [mvn, clean, package, -f, pom.xml, -B, -V, -e, -Dfindbugs.skip, -Dcheckstyle.skip, -Dpmd.skip=true, -Denforcer.skip, -Dmaven.javadoc.skip, -DskipTests, -Dmaven.test.skip.exec, -Dlicense.skip=true, -Drat.skip=true])
  Error: We were unable to automatically build your code. Please replace the call to the autobuild action with your custom build steps.  Failure invoking /opt/hostedtoolcache/CodeQL/0.0.0-20211025/x64/codeql/java/tools/autobuild.sh with arguments .

        Exit code 1 and error was:

        Picked up JAVA_TOOL_OPTIONS:  -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false

  CommandInvocationError: Failure invoking /opt/hostedtoolcache/CodeQL/0.0.0-20211025/x64/codeql/java/tools/autobuild.sh with arguments .

        Exit code 1 and error was:

        Picked up JAVA_TOOL_OPTIONS:  -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false

      at runTool (/home/runner/work/_actions/github/codeql-action/v1/lib/codeql.js:728:15)
      at processTicksAndRejections (internal/process/task_queues.js:93:5)
      at async Object.runAutobuild (/home/runner/work/_actions/github/codeql-action/v1/lib/codeql.js:464:13)
      at async runAutobuild (/home/runner/work/_actions/github/codeql-action/v1/lib/autobuild.js:29:5)
      at async run (/home/runner/work/_actions/github/codeql-action/v1/lib/autobuild-action.js:57:13)
      at async runWrapper (/home/runner/work/_actions/github/codeql-action/v1/lib/autobuild-action.js:70:9)

Hi @Zduniusz,
Thanks for your issue!
Have you set up a Java 17 environment on Actions using https://github.com/actions/setup-java?

Hi, thanks for your response. No, I haven't, I've kept it original. https://github.com/Zduniusz/Atosiak/blob/9ceeb8a38fd002ed3e56de8d9e69359956615092/.github/workflows/codeql-analysis.yml

I think it'll work if you add something like this to your workflow file:
- uses: actions/setup-java@v1
  with:
    java-version: 17


About texture

Why the texture of models are not rendered?

I find that only part of the models will not render the texture, quite wired.

While most models have textures, some models do not (e.g. bicycles).
On Mon, Jan 25, 2016 at 10:42 PM, Naiyan Wang<EMAIL_ADDRESS>wrote:

I find that only part of the models will not render the texture, quite
wired.
—
Reply to this email directly or view it on GitHub
https://github.com/ShapeNet/RenderForCNN/issues/1#issuecomment-174859319
.

--
Charles Ruizhongtai Qi
PhD Candidate at Stanford AI Lab
Email<EMAIL_ADDRESS>Phone:<PHONE_NUMBER>

Here is a render result for the same model using the provided codes and the results on shapenet website.
Model ID: b96d8d6400e319eb8d6ee799b331d163

Got puzzle here as well. Is this because the texture png image path are messed up or those texture png files are missing?

@bittnt Did you meet the same situation? I have never modify the mtl file which defines the texture for the model.

@winstywang Yes. I have also seen some textures are missing. Maybe because of the texture files are broken (not downloaded correctly) or missing.

I tried to load it with other renderer, it works well. Is it a bug within blender, or do we need to load the texture in the codes?

Maybe you can try this renderer: https://github.com/shi-jian/mitsuba-shapenet
It works a lot better than blender for ShapeNet data. I haven't tried it for this specific model, though.

@winstywang I met the same situation. Have you solved this problem?


Better API for rich components

The props injected into child components can conflict with the other props of the child component. Example:
import { forwardRef, useRef } from "react";
import Draggable from "react-draggable";
import { italic } from "./App.module.css";

const Component1 = forwardRef((props, ref) => {
  const { className } = props;

  console.log(props);

  return (

      This should not be italic

      This should be italic

  );
});

export default function App() {
  const ref = useRef(null);

  return (
    <Draggable nodeRef={ref}>
      <Component1 ref={ref} className={italic} />
    </Draggable>
  );
}

Link to codesandbox: https://codesandbox.io/s/react-draggable-bug-3-p99yd?file=/src/App.js
In this example, creating
 results in the div getting unwanted props.
There should be a better API for components like Component1, preferably without modifying the props. This could be done by lifting the state up into the component that renders <Draggable /> and <Component1 />. This is what a 'better API' could look like:
import { forwardRef, useRef } from "react";
import Draggable, { useRichComponent } from "react-draggable";
import { italic } from "./App.module.css";

const Component1 = forwardRef((props, ref) => {
  const { draggableProps, className } = props;

  return (

      This should not be italic

      This should be italic

  );
});

export default function App() {
  const ref = useRef(null);
  const { childProps, internalControl } = useRichComponent();

  return (
    <Draggable nodeRef={ref} internalControl={internalControl}>
      <Component1 ref={ref} className={italic} draggableProps={childProps} />
    </Draggable>
  );
}

The above example uses a hook for the <Draggable /> to control the props of <Component1 /> without modifying the jsx element props. This is similar to Form.useForm() in Ant Design.
This issue is related to #585 because I don't think the solution to the issue is a good API, as it can cause problems demonstrated in the sandbox.

What does internalControl do? And why not just do this:
const Component1 = forwardRef((props, ref) => {
  const { className, ...restProps } = props;

  console.log(props);

  return (

      This should not be italic

      This should be italic

  );
});

@STRML internalControl is some function / object that allows the draggable component to control the value of childProps. Internally, it could be using useState to get and set the props.

@STRML your example would not work because then the draggable class name won't be on the div. The component would need to extract the draggable class names from the custom class names, and put the draggable class names in the div and the custom class name on the 2nd span. I'm not sure of the class name prop is necessary for the dragging to work, but I'm assuming not having the class name on the div can break things.

It doesn't need the class.
Another way we could work around this would be to set the event handlers on
the ref instead of the child, so the props don't even need to be passed.
On Wed, Jul 21, 2021 at 10:25 PM Rajas Paranjpe @.***>
wrote:

@STRML https://github.com/STRML your example would not work because
then the draggable class name won't be on the div. The component would need
to extract the draggable class names from the custom class names, and put
the draggable class names in the div and the custom class name on the 2nd
span. I'm not sure of the class name prop is necessary for the dragging to
work, but I'm assuming not having the class name on the div can break
things.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/react-grid-layout/react-draggable/issues/586#issuecomment-884616154,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAJEKPZD6JPGED5GJZXPVW3TY56SNANCNFSM5AY2FDKA
.

@STRML I think that's the best solution.

There's going to be some performance loss as a result of this unfortunately, as event handlers would be directly attached to every single Draggable rather than delegated by React. For simple use cases this is fine, but for larger use cases like React-Grid-Layout (where there may be hundreds of draggables between the grid items & the resize handles), I am not sure this is an appropriate tradeoff.

@STRML then I think my first solution would work best, with the useRichComponent hook. That would let React do the event handler stuff while still being flexible.

I am running into this as well. My component's inner HTML element is given many props, some of which conflict with those injected by Draggable. My custom component has props that are not appropriate to pass to the inner HTML element. Therefore, I've landed on the following good-enough solution:
// Merge in props passed from Draggable and DraggableCore into desired props
function mergeDraggableProps(receivedProps, desiredProps) {
  return {
    ...desiredProps,
    className: cn(receivedProps.className, desiredProps.className),
    style: {
      ...receivedProps.style,
      ...desiredProps.style,
    },
    transform: receivedProps.transform, // NOTE: I don't have any transform so didn't bother merging here
    onMouseDown: receivedProps.onMouseDown,
    onMouseUp: receivedProps.onMouseUp,
    onTouchEnd: receivedProps.onTouchEnd,
  };
}

function MyComponent(...) {
  // ...

  // simplified example; full props I'm actually using will be provided below for additional context
  const targetProps = {
    className: 'foo bar',
    style: {
      left: `${left}rem`,
      width: `${width}rem`,
    },
    onClick: noSeek,
    tabIndex: 0,
  };

  const innerProps = mergeDraggableProps(props, targetProps);

  return (

foo

  );
}

I think a good solution would be if Draggable could handle this merging instead of clobbering props including className and style. And/or provide a merge function such as the one I wrote above, as a part of the library's domain instead of app domain.

I just wrestled with getting this fully hooked up with TypeScript, so worth documenting here:
interface DraggableCoreChildProps {
  onMouseDown: MouseEventHandler<HTMLDivElement>;
  onMouseUp: MouseEventHandler<HTMLDivElement>;
  onTouchEnd: TouchEventHandler<HTMLDivElement>;
}

interface DraggableChildProps extends DraggableCoreChildProps {
  className: string;
  style: React.CSSProperties;
  transform: string;
}

function mergeDraggableProps(
  draggableProps: DraggableChildProps | Record<string, unknown>,
  childProps: Partial<DraggableChildProps> & Record<string, unknown>
) {
  if (!hasDraggableProps(draggableProps)) {
    return childProps;
  }

  return {
    ...childProps,
    className: cn(draggableProps.className, childProps.className),
    style: {
      ...draggableProps.style,
      ...childProps.style,
    },
    transform: draggableProps.transform,
    onMouseDown: draggableProps.onMouseDown,
    onMouseUp: draggableProps.onMouseUp,
    onTouchEnd: draggableProps.onTouchEnd,
  };
}

Note that this solution doesn't account for DraggableCore usage without Draggable, but it would be easy to extend it to do so.


AppImage build script failing

FYI, @probonopd
Travis CI Linux build has been failing for 5 days (since https://travis-ci.org/PowerShell/PowerShell/builds/258768719)
It's because building AppImage is failing:
Steps to reproduce
Run start-pspackage -AppImage
on Ubuntu 14.04
Expected behavior
appimage.sh should work
Actual behavior
tar: ./usr/bin: Cannot open: File exists
tar: Exiting with failure status due to previous errors
dpkg-deb: error: subprocess tar returned error exit status 2
+rm usr/bin/powershell

line 427 in appimage.sh is failing:
find ../*.deb -exec dpkg -x {} . ; || true
Environment data

> $PSVersionTable

Strange, this script has not been touched since months...https://github.com/PowerShell/PowerShell/commits/master/tools/appimage.sh

Maybe adding --force-overwrite to the dpkg -x call might help?

The error happens when running dpkg -x ../powershell_6.0.0-beta.8-1ubuntu<IP_ADDRESS>_amd64.deb .
root@7bc6cce4fb08:/PowerShell/powershell/powershell.AppDir# dpkg -X ../powershell_6.0.0-beta.8-1ubuntu<IP_ADDRESS>_amd64.deb .
./
./usr/
./usr/bin
tar: ./usr/bin: Cannot open: File exists
./usr/share/
./usr/share/doc/

I will try adding --force-overwrite

Adding --force-overwrite doesn't solve the problem:
root@5680e22d76ad:/PowerShell/powershell/powershell.AppDir# dpkg -x --force-overwrite ../powershell_6.0.0-beta.8-1ubuntu<IP_ADDRESS>_amd64.deb .
tar: ./usr/bin: Cannot open: File exists
tar: Exiting with failure status due to previous errors
dpkg-deb: error: subprocess tar returned error exit status 2

root@5680e22d76ad:/PowerShell/powershell/powershell.AppDir# dpkg -x --force-overwrite-dir ../powershell_6.0.0-beta.8-1ubuntu<IP_ADDRESS>_amd64.deb .
tar: ./usr/bin: Cannot open: File exists
tar: Exiting with failure status due to previous errors
dpkg-deb: error: subprocess tar returned error exit status 2

root@5680e22d76ad:/PowerShell/powershell/powershell.AppDir# dpkg -x --force-overwrite-diverted ../powershell_6.0.0-beta.8-1ubuntu<IP_ADDRESS>_amd64.deb .
tar: ./usr/bin: Cannot open: File exists
tar: Exiting with failure status due to previous errors
dpkg-deb: error: subprocess tar returned error exit status 2

Has the format or content of powershell_*-1ubuntu<IP_ADDRESS>_amd64.deb changed recently?

We just found the Ubuntu packages are broken -- symbolic file '/usr/bin/powershell' is missing after install. The AppImage failure might be caused by it. We are investigating.

I filed https://github.com/PowerShell/PowerShell/issues/4480 to track what I believe is the root cause.


[GHSA-mv73-f69x-444p] Go Fiber CSRF Token Validation Vulnerability

Updates

Affected products
Description

Comments
The setting is called SameSite=Strict (instead of SameSite=Secure)
https://owasp.org/www-community/SameSite

Hi there @ReneWerner87! A community member has suggested an improvement to your security advisory. If approved, this change will affect the global advisory listed at github.com/advisories. It will not affect the version listed in your project repository.
This change will be reviewed by our Security Curation Team. If you have thoughts or feedback, please share them in a comment here! If this PR has already been closed, you can start a new community contribution for this advisory

Thx, we will take care


Add a heuristic, in src/core/jpg.js, to handle JPEG images with a wildly incorrect SOF (Start of Frame) scanLines parameter (issue 10880)

Add basic validation of the scanLines parameter in JPEG images, before delegating decoding to the browser
In some cases PDF documents can contain JPEG images that the native browser decoder cannot handle, e.g. images with DNL (Define Number of Lines) markers or images where the SOF (Start of Frame) marker contains a wildly incorrect scanLines parameter.
Currently, for "simple" JPEG images, we're relying on native image decoding to fail before falling back to the implementation in src/core/jpg.js. In some cases, note e.g. issue 10880, the native image decoder doesn't outright fail and thus some images may not render.
In an attempt to improve the current situation, this patch adds additional validation of the JPEG image SOF data to force the use of src/core/jpg.js directly in cases where the native JPEG decoder cannot be trusted to do the right thing.
The only way to implement this is unfortunately to parse the beginning of the JPEG image data, looking for a SOF marker. To limit the impact of this extra parsing, the result is cached on the JpegStream instance and this code is only run for images which passed all of the pre-existing "can the JPEG image be natively rendered and/or decoded" checks.

Slightly off-topic: Working on this really makes me start questioning if native rendering/decoding of JPEG images is actually a good idea.
There's certain kinds of JPEG images not supported natively, and all of the validation which is now necessary isn't "free". At this point, in the NativeImageDecoder, we're having to check for certain properties in the image dictionary, parse the ColorSpace, and finally read the actual image data to find the SOF marker.
Furthermore, we cannot just send the image to the main-thread and be done in the "JpegStream" case, but we also need to wait for rendering to complete (or fail) before continuing with other parsing.
In the "JpegDecode" case we're even having to parse part of the image on the main-thread, which seems completely at odds with the principle of doing all heavy parsing in the Worker, and there's also a couple of potentially large (temporary) allocations/copies of TypedArray data involved as well.

Add a heuristic, in src/core/jpg.js, to handle JPEG images with a wildly incorrect SOF (Start of Frame) scanLines parameter (issue 10880)
This whole patch feels somewhat arbitrary, and I'd be slightly worried about possibly breaking something else.
To limit the impact of these changes, we only re-parse JPEG images using a reduced scanLines value if and only if: An unexpected EOI (End of Image) marker was encountered during decoding of Scan data and the "actual" scanLines value is at least one order of magnitude smaller than expected.

Fixes #10880

/botio-linux preview

/botio test

I'm still unsure about if we should take this approach. As you already noted there are downsides that we should consider, and in general the heuristic feels a bit fragile. Wouldn't it be better to check if #11601 works better instead, since it avoids quite a bit of overhead and ensures that we can always decode these kinds of images properly? I would be convinced with a benchmark of this PR versus #11601; if there are no visible changes in rendering and no significant regressions in runtime, I'd much rather use that approach instead. Would that be possible to check?

Wouldn't it be better to check if #11601 works better instead

That'd only replace the first commit in this PR, but even with that done you'd still need the src/core/jpg.js changes to actually address the referenced issue.

I have thought about this some more and I think it's indeed best to merge this now to get the issue resolved. We can look at the native decoding later. Thanks!

/botio makeref


feat(toast): add Toast.useToastTime

Adds Toast.useToastTime, which can be used to access the elapsed and remaining time (or fraction of the duration) that a toast has been / will stay open for.
The code is extracted from/inspired by Toast.ProgressFill and I adjusted Toast.ProgressFill to use the new API.
Motivation
I use daisyUI to style kobalte components. daisyUI provides a progress component (component means set of css classes here), that i would like to use with kobalte's toast system.
The problem is that daisyUI uses a native progress element, while kobalte uses two divs (Toast.ProgressTrack and Toast.ProgressFill) and relies on a css variable to show the current value. Sadly, I don't think there is a direct way to use the css variable to populate the value attribute of the progress element. I could try to use a hidden Toast.ProgressFill, listen to changes of its --kb-toast-progress-fill-width variable and apply the value to the value property of the progress element, but that sounds like ugly code and poor performance.
Since I see no other way to get the value I need from kobalte, I propose to add this API. If there is a way I didn't see, please let me know :)
Docs
The custom progress element in the new example for Toast.useToastTime is currently unstyled, which doesn't fit nicely into the rest of the docs. I'm unsure whether we should add some styles to make it fit better or leave it as-is to show that it really is a raw/native progress element.

We plan to expose all component context for custom use cases. We want to finish a few tasks before we tackle this.
Thanks for the work, will definitely merge once ready.


[FEATURE] Metadata UUID Support

Is your feature request related to a problem? Please describe.
Metadata method to add Object Value has been deprecated:
    @Deprecated
    public Metadata add(String key, Object value) {
        return put(key, value.toString());
    }

And I would like to store UUID
Describe the solution you'd like
Add UUID as supported metadata
Describe alternatives you've considered
Using String for the moment

Issue with InMemoryEmbeddingStore that use GsonInMemoryEmbeddingStoreJsonCodec so serialize and deserialize the store.
But as Metadata is a Map<String, Object>,  deserialization retrieve UUID as String.

@humcqc could you please clarify?

I've implemented it and added some tests, but i face a blocking issue in InMemoryEmbeddingStoreSerializedTest
when the store is serialized and deserialized  it transform UUIDs in Metadata values to Strings and then the filter test  throws an exception
Not sure we can fix this.

Could you open a draft PR with your changes? I guess we can handle this case in ensureTypesAreCompatible, similar to how we do with numbers:
if (actualValue instanceof Number && comparisonValue instanceof Number) {
            return;
        }

Do you know which vector stores support UUID as a data type?

Could you open a draft PR with your changes? I guess we can handle this case in ensureTypesAreCompatible, similar to how we do with numbers:
if (actualValue instanceof Number && comparisonValue instanceof Number) {
            return;
        }

Yes i've tried this, but it fails after. I will

Do you know which vector stores support UUID as a data type?

I've fixed all store that have a test extending EmbeddingStoreWithFilteringIT, just the serialized InMemoryEmbeddingStore still not work.
Draft PR : https://github.com/langchain4j/langchain4j/pull/1211

Finally got it working adding a hack, to check if it's ok for you : https://github.com/langchain4j/langchain4j/pull/1211/files#r1622090514

Implemented in https://github.com/langchain4j/langchain4j/pull/1211


[ST] Impossible to upgrade relayer fee

User is trying to upgrade fee (UI asks for 0 MATIC) but it doesn't help
tx: https://connextscan.io/tx/0x76b12839ccf6e3f6fd4915ed7f77ae3ced5a7c560c6523e3a338c79829ea9a29

support ticket: https://discord.com/channels/454734546869551114/1199363125904937000

The needed amount looks like it's priced in USD. Does sequencer do the conversion correctly, I wonder.

Price of the transacting asset comes back as 0 here.

It worked after a bump in native token.
So the problem is that UI and Sequencer calculates the fee value differently if the fee token isn't supported by Gelato.
We also need to give an option to bump in origin native token in connextscan.


Is there a way to add version as an input while generating or building commandlets

I am using autorest for SDK generation and the commands version is always 0.1.0. Is there a way to add that?

You may create a readme.md, and put all the configurations in it. And you may configure the module version as below.
module-version: 1.1.0

Thanks for the help

Can you also suggest if there is a way of grouping the only certain generated commandlets based on a tag?


Missing declared license

Type: Missing
Summary:
Missing declared license
Details:
Missing license
Resolution:
MIT: https://bitbucket.org/cffi/cffi/src/v1.13.0/LICENSE
Affected definitions:

cffi 1.13.0

@geneh Can you resolve this conflict? Thanks

@geneh Can you resolve this conflict? Thanks

Done!

@geneh This one is still under conflict.


add a project template for SpecFlow

It would be useful to have a project template for WbTstr. Net and SpecFlow.

Initial version added in (02a66159aae80d147f18f0ef8add9db549ce19a9), needs elaboration for working example.


feat(test): add integration test for jiva upgrades

Signed-off-by: shubham<EMAIL_ADDRESS>
What this PR does:
This PR

adds jiva integration tests
refactors and adds quay push in workflows

Which issue(s) this PR fixes:
Fixes #93
Special notes for your reviewer:
Checklist

[ ] PR messages has document related information
[ ] Labelled this PR & related issue with documentation tag
[ ] PR messages has breaking changes related information
[ ] PR messages has upgrade related information
[ ] Labelled this PR & related issue with requires-upgrade tag
[ ] Tests updated

@shubham14bajpai Please check why is the pull_request action failing for jiva upgrade e2e.

@shubham14bajpai Please check why is the pull_request action failing for jiva upgrade e2e.

The code PR is still pending for merge. I will rebase this PR after that get's merged.


Not working on Linux

Hello!
I have a problem with starting Qml.Net app on Linux (CentOs 7, x64).
App is crashing on start with error:

The type initializer for 'Qml.Net.Internal.Interop' threw an exception. ---> System.Exception: Library could not be loaded: libQt5QuickControls2.so.5: cannot open shared object file: No such file or directory: /home/myuser/myapp/libQmlNet.so

Both libQmlNet.so and libQt5QuickControls2.so.5 are exist in folder /home/myuser/myapp/
Can you help me?
Thanks in advance

Could you share a link to your code, so I can reproduce it locally?

I have this error with demo example: https://github.com/qmlnet/qmlnet-examples

Problem appears when you build a self-contained application with .net core libs included.
As far as I see there are some troubles with publishing self-contained qml.net application: there are no sub-folders in publish directory, all files and libs lay in one directory without any structure.
Also I can show log with L_DEBUG=all, if it is needed

Somewhat new with .net core here.  I got the same thing with the sample.  Getting the error below:

Below is the output.  Which folder should be copied over to linux (ubuntu 14.04 lts)?

I tried both.  Publish with all the files, even the "missing" one in the error above.  Am i missing something about the deployment of files?

Yeah, publishing self-contained apps isn't currently supported, because of how NuGet flattens directories when publishing.
See this issue.
I have plans to make the Qt environment not deployed as a part of the NuGet packages, and instead, a zip that is downloaded from some network location. The libQmlNet.so will still be deployed as a part of the NuGet packages though.

Hi,
These are the settings for the publish in VS, its now Framework dependent instead of self-contained.

Same as the screenshot from my previous comment above, which folder do I copy over to the target Linux environment?  Publish or linux-x64.

Now that I think about it, I think it will break in framework dependent mode too.
The solution would be to publish without the Qml.Net.*Binaries packages, and manually extract the Qml.Net.LinuxBinaries contents into the directory, preserving the directory structure.
The directory structure is important, and it is what get's destroyed when dotnet does it's publish.
This is a top priority to fix.

This will be resolved as a part of #87

This has been resolved as of version 0.8.0. You can checkout the latest examples for verification.

After updating to 0.9.0, the first app start takes very long time. The second and further starts are fast, even after reboot.
Before updating all starts were fast.

After updating to 0.9.0, the first app start takes very long time (both on Windows and Linux).

Yup. That is the time it takes to auto-download a usable Qt runtime into the users directory. See this for more info.
Documentation hasn't been written yet, but you can get around this by deliverying the Qt runtime with your application. Extract a *-runtime.tar-gz to where your executable lives. It will get discovered/used.


Optimize TracerContext.activeSpanStack

Right now, TracerContext.activeSpanStack is a ArrayList, which has a certain size. Resize it or too many will cause too many memory and gc resource.
So I will set it as a linkedList.

@ascrutae Please report test result.

Tested.


Expand Cloud Build sample

The Cloud Build sample provides a very basic setup for building with cloud build. It should be expanded to show how users can take advantage of more features of cloud build/artifact registry builds (such as automated build triggers). Users should be encouraged to fork this repo and point a cloud build trigger at their own fork, with screenshots and/or gcloud tutorial steps. Finally, it should show how to activate one of these triggers (such as merging a commit to the fork) and the users see their own image built from github in artifact registry.

As part of resolving this issues, the following action items will be done -

A new recipe 'cloudbuild-automation' under build/ will be added to this repo.
Following the newly added sample, the users can get a sense of how to use CloudBuild with GitHub to automate build tasks.

The sample will be configured to build and push a Docker image containing a custom built Opentelemetry collector (built using OpenTelemetry Collector Builder) whenever there is a push to the main (or whatever branch is configured to be tracked).

This recipe will contain terraform scripts to show what operations need to be done in Google Cloud in order to create the build trigger and artifact registry.
Detailed instructions on how to run the scripts.


Implementing a siamese loss function

Hi I have been trying to implement a Siamese kind of loss function, but I cant figure out how to compute the embeddings for two different inputs inside the autograd function
Here is what I am trying to do
t = require 'torch'
grad = require 'autograd'
require 'cutorch'
require 'cunn'
require 'cudnn'

local model = nn.Sequential()
model:add(cudnn.SpatialConvolution(1, 16, 3, 3))
model:add(cudnn.Tanh())
model:add(nn.Reshape(16*30*30))
model:add(nn.Linear(16*30*30, 128))
model:add(cudnn.Tanh())
model:cuda()

local modelf, params = grad.functionalize(model)

neuralNet = function(params, x)
   local x1 = x[1]
   local x2 = x[2]

   local h = modelf(params, x1)
   local h2 = modelf(params, x2)
   return torch.sum(torch.abs(h-h2))
end

dneuralNet = grad(neuralNet)

tt = torch.rand(1,1,32,32):cuda()
tt2 = torch.rand(1,1,32,32):cuda()

dparams, loss = dneuralNet(params, {tt,tt2})
print(loss)

This does not work since h==h2, so loss comes out 0
Is there any way to do something similar?

That's pretty non-obvious behavior, unfortunately, and we should probably fix it.
This works for me:
t = require 'torch'
grad = require 'autograd'

local model = nn.Sequential()
model:add(nn.SpatialConvolution(1, 16, 3, 3))
model:add(nn.Tanh())
model:add(nn.Reshape(16*30*30))
model:add(nn.Linear(16*30*30, 128))
model:add(nn.Tanh())

local modelf, params = grad.functionalize(model)

neuralNet = function(params, x)
   local x1 = x[1]
   local x2 = x[2]

   local h = torch.clone(modelf(params, x1))
   local h2 = torch.clone(modelf(params, x2))
   return torch.sum(torch.abs(h-h2))
end

dneuralNet = grad(neuralNet)

tt = torch.rand(1,1,32,32)
tt2 = torch.rand(1,1,32,32)

dparams, loss = dneuralNet(params, {tt,tt2})
print(loss)

Now that I look at it, it does seem logical, this is also how the torch nn models work. However, maybe a mention in the docs could be useful. Thanks & closing.


SignblockWithCPID changes

Currently you can stake a block even if the signature fails. this should not be possible this has already caused a problems with me syncing. i been looking into this and decided some prevention was important and I believe i see some problems that can also lead to it but for the mean time these blocks should not be able to be submitted to the network and should fail locally.
17:09:47 ERROR: ConnectBlock[ResearchAge]: Bad CPID or Block Signature : CPID f2109bf8e9b61db3360faea15821ff68, cpidv2 , LBH 00d05f371cf40db4c94be0f467b70bab253c4a31f7a35d0c539b5b37f864d882, Bad Hashboinc [f2109bf8e9b61db3360faea15821ff68<|><|><|>0<|>0.00000<|>0<|><|><|>0<|>0<|>v<IP_ADDRESS>-unk<|>1.01000000<|>0<|>0<|><|>1<|>SGqL2GRir41saUvFRLQ8dZ1aPv66bdaKMX<|>00d05f371cf40db4c94be0f467b70bab253c4a31f7a35d0c539b5b37f864d882<|>41.01140504<|><|><|><|><|>1.01<|>0.000000<|>0.250000<|>0.00<|>2e674fe69a022f5d42622c49549adc29aeb52eb488789015e5d534498101e30c<|><|>0442607b8c4186d219a8db17a7e8b472febec4b8a43df007b26821c233dc0b610f0b1be465647cbe594bc170356f16de9fc55011eddbad359feb3d2768cf092a4d<|>Unable to sign message, check private key.]
This should not be able to happen and this change will cause the block to fail to stake locally. I'm still looking into the other signature issues but believe i have a lead on it.
Also apart of this i added a >= 1 for magnitude in getnextproject as a side add. Minimum magnitude is 1. if they have 1 magnitude the thrashing could still occur under the circumstances. I already know why that block failed the signature and will continue my investigation to correct that problem.
this is a step in the right direction imo for that specific failure of signature

please verify this as i know investor signatures are empty however the boinc publickey doesnt appear to be set for investor. plz double check as im still looking into it.

this WIP i have a few other changes to consider

more debug on this matter and its effect:
2018-02-19 16:43:37 GetHistoricalMagnitude: Last staked block found at height 479375, but cannot verify magnitude older than 6 months (min 988121)!
2018-02-19 16:43:37 VerifyCPIDSignature: invalid signature sSignature=Unable to sign message, check private key., cached key=0442607b8c4186d219a8db17a7e8b472febec4b8a43df007b26821c233dc0b610f0b1be465647cbe594bc170356f16de9fc55011eddbad359feb3d2768cf092a4d
2018-02-19 16:43:37 ERROR: ConnectBlock[ResearchAge]: Bad CPID or Block Signature : CPID f2109bf8e9b61db3360faea15821ff68, cpidv2 , LBH 00d05f371cf40db4c94be0f467b70bab253c4a31f7a35d0c539b5b37f864d882, Bad Hashboinc [f2109bf8e9b61db3360faea15821ff68<|><|><|>0<|>0.00000<|>0<|><|><|>0<|>0<|>v<IP_ADDRESS>-unk<|>1.01000000<|>0<|>0<|><|>1<|>SGqL2GRir41saUvFRLQ8dZ1aPv66bdaKMX<|>00d05f371cf40db4c94be0f467b70bab253c4a31f7a35d0c539b5b37f864d882<|>41.01140504<|><|><|><|><|>1.01<|>0.000000<|>0.250000<|>0.00<|>2e674fe69a022f5d42622c49549adc29aeb52eb488789015e5d534498101e30c<|><|>0442607b8c4186d219a8db17a7e8b472febec4b8a43df007b26821c233dc0b610f0b1be465647cbe594bc170356f16de9fc55011eddbad359feb3d2768cf092a4d<|>Unable to sign message, check private key.]
2018-02-19 16:43:37 ERROR: ReorganizeChain: ConnectBlock 1d30c6d4dce377d69c037f1a725aabbc6bafa72a95456dbe2b2538bc1da115bd failed
2018-02-19 16:43:37 Previous block 00d05f371cf40db4c94be0f467b70bab253c4a31f7a35d0c539b5b37f864d882
2018-02-19 16:43:37 InvalidChainFound: invalid block=1d30c6d4dce377d69c03  height=1168122  trust=3275838333972824660711873320762369734724920483558585417587760059443852534218  blocktrust=1456216380  date=2018-02-19 08:14:56
2018-02-19 16:43:37 InvalidChainFound:  current best=00d05f371cf40db4c94b  height=1168121  trust=3275838333972824660711873320762369734724920483558585417587760059442396317838  blocktrust=4156820992  date=2018-02-19 08:13:20
the invalid chain 00d0 helped me determine that that was a fork as thats the LBH in the beacon hashboinc as well. but also the 1d30 invalid chain is the one chain that gridcionstats.eu is on and it shows the 00d as last block hash for that. so i connected the dots as even gridcoinstats shows unable to sign message. note that this cpid had advertised a beacon 2 days prior on that fork on block 1166578.
from there i watched my logs as it kept reorging back a little bit each time and for some reason that 00d0 block keeps being mentioned as common as well

My pr #922 prevents blocks with obviously wrong signature from being accepted here. Having this bug unfixed does stress out the checks.

@tomasbrod Do you mean this PR is redundant with #922?

@denravonska no, My pr would stop the error from propagating. This PR prevents the error from generating.


Closes: #1 Updated validations.py python script.

Updated validations.py pythin script by Salim O. Oyinlola
Fixed the behavior of validate_user function in validation.py.
Fixes #<issue_number_goes_here>

It's a good idea to open an issue first for discussion.

[ ] Tests pass
[ ] Appropriate changes to README are included in PR

Updated validations.py python scripts.


Question about and / or conditions.

Hello,
Is there a way to use this with complex and & or condtions and nested parenthetical conditions?
Thanks,
Dave

Currently no. You can chain rules together and it supports short circuiting.


[iOS - RN 0.61.1 migration] React/RCTBridgeModule.h file not found

Reopening bug that is wrongly closed
https://github.com/facebook/react-native/issues/26615

React Native version: 0.61

Steps To Reproduce

Upgrade to 0.61 with upgrade-helper-tool
If your project has a 3rd party module that are Linked manually, building it results in: React/RCTBridgeModule.h file not found

Describe what you expected to happen:
To compile correctly

Reopening bug that is wrongly closed
#26615
React Native version: 0.61
Steps To Reproduce

Upgrade to 0.61 with upgrade-helper-tool
If your project has a 3rd party module that are Linked manually, building it results in: React/RCTBridgeModule.h file not found

I have same issue

the same
many libraries migrated to pods
[!] CocoaPods could not find compatible versions for pod "ReactCommon/callinvoker":

@loga4
Have you checked https://github.com/facebook/react-native/pull/26599?

@ma96o thks!

Also being affected by this and can no longer build link + build my custom native module

Hi @alnorris !
When you go to scheme -> edit scheme -> build. Do you have see React (missing) ? If so, i might have a solution because this happened to me. If not, need more information :/

I had the same issue. I just did following to fix:

Remove the package-name.xcodeproj of package from Libraries in Xcode
Remove package Frameworks if any, in Xcode.
Remove package from Build Phases > Link Binary with Libraries
Remove search headers of that package in: Build Settings > Header Search Paths (do that for all project Targets, even -tv, -tests)
Make sure the package implements correctly package-name.podspec file in root (check any community based package for reference)
run cd ios && pod install
Run: Clean ⇧+⌘+K & Clean Build Folder ⎇+⇧+⌘+K

This helped me solve the missing xxx.h files from React.
I also did remove React.xcodeproj from scheme build targets, since it was remove in latest release.

@usrbowe This is good workaround, but it doesn't solve the issue of manually linked packages. Some old packages don't have podspecs and have package owners are unresponsive to PR's to add them.

Can you point me to an example of such a library? I will try to reproduce it. You can also zip me your project and I will try to see what changes are needed to make it work.
My understanding is that these cases are deprecated and we are moving towards fully automatic linking w/o relying on that.

@grabbou, any library without a podspec. Ex: https://github.com/smalltownheroes/react-native-adobe-analytics. If manual linking is in fact deprecated, this would advise to include this as a breaking change, and remove this from the documentation: https://facebook.github.io/react-native/docs/linking-libraries-ios#manual-linking

Hi @alnorris !
When you go to scheme -> edit scheme -> build. Do you have see React (missing) ? If so, i might have a solution because this happened to me. If not, need more information :/

I'm seeing that. How did you fix it?

@grabbou, I have similar situation, I cannot use React-native-navigation V2 or V3 because of bugs,  but V1 does not support ^RN60above, can you help, I have my forked RNNV1?

Hi @alnorris !
When you go to scheme -> edit scheme -> build. Do you have see React (missing) ? If so, i might have a solution because this happened to me. If not, need more information :/

My question is this, is there any way to solve it?

@zhenghui0705  well if you have the react missing thing, here's what I did.

Check that I have React in my pods (pod 'React', :path => '../node_modules/react-native/'). If not, add it.
Uninstall reinstall pods (pod deintegrate && pod clean && pod install in the ios folder,  I believe the pod deintegrate command needs to be downloaded and isn't available by default)
Go to scheme -> edit scheme -> build, delete the React(missing) using the 'minus' button. Click on 'add' or a 'plus' button. Find React (should be in the Pods category) and add it. Finally, make sure all boxes are ticked for React, and place it at the top of the list.

Here you go, I hope this helps. If however you do not have the React(missing), I have no idea how to solve this since i've never had this problem :/

@zhenghui0705 Here's how I made it work with the workaround.
React/RCTDefines.h' file not found (RN0.61)

After burning a day on this, building with legacy build system did the trick:
File>Workspace Settings> Build system > legacy build system

any solution? I also find this error in upgrading to RN 0.61.5

Getting this on 0.61.4

I managed to fix it by adding $(SRCROOT)/../../../../ios/Pods/Headers/Public/** to each 3rd party target. React it's only accessible by pods now.

I managed to fix it by adding $(SRCROOT)/../../../../ios/Pods/Headers/Public/** in Header Search Paths (recursive) to each 3rd party target. React it's only accessible by pods now.

faced same issue. why there are so many slashes ? Shouldn't it be $(SRCROOT)/Pods/Headers/Public/** ?

@zhenghui0705 well if you have the react missing thing, here's what I did.

Check that I have React in my pods (pod 'React', :path => '../node_modules/react-native/'). If not, add it.
Uninstall reinstall pods (pod deintegrate && pod clean && pod install in the ios folder,  I believe the pod deintegrate command needs to be downloaded and isn't available by default)
Go to scheme -> edit scheme -> build, delete the React(missing) using the 'minus' button. Click on 'add' or a 'plus' button. Find React (should be in the Pods category) and add it. Finally, make sure all boxes are ticked for React, and place it at the top of the list.

Here you go, I hope this helps. If however you do not have the React(missing), I have no idea how to solve this since i've never had this problem :/

It's seem OK, but in my case: After click Plus Sign > I cannot found React in Pods, only ReactCore and ReactCoreModules were seen :(

Is there any updated solution for this? I'm using react native 0.61.5 and still getting the React/RCTBridgeModule.h file not found in ImagePickerManager.h?

I spent 2 days on getting this all in one workaround:
https://github.com/facebook/react-native/issues/26665#issuecomment-571082076

Just install everything from Pods,
cd ios
pod init
install all the required libraries using pod,
remove all the Xcode project from libraries,
remove all the libraries from linked frameworks and libraries except libPods-ProjectName.a
Go to your Build Setting, Header Search Paths, remove all the paths and add  “$(SRCROOT)/Pods/Headers/”
Now open .xworkspace and your code will work like a charm
https://medium.com/@arjunsinghrajput/something-wrong-with-react-native-b398d5a66278

2. pod deintegrate && pod clean && pod install
@Alaa-Ben
pod clean is not a valid command. Did you mean
pod cache clean?

@raphaelpinel
pod cleanand pod deintegrate are downloadable plugins:
sudo gem install cocoapods-deintegrate cocoapods-clean

Hi @alnorris !
When you go to scheme -> edit scheme -> build. Do you have see React (missing) ? If so, i might have a solution because this happened to me. If not, need more information :/

Yes it does for me , can you help ?

Same error here

the only solution that worked for me is that you create .podspec file to whatever library you using and install it using Pods , and dont manual link or anything of that .. saddly not all libraries are up to date, so had to do it yourself manually to setup a .podspec file

@loga4
Have you checked #26599?
@ma96o  did this and the run pod install, I got this error.

this should fix this hell https://medium.com/@hamoudaarfawi/upgrading-react-native-to-rn0-60-react-rct-h-file-not-found-solved-e9bd65fc4ee6

The solution, for me, was deleting the entire ios folder, generating a new project with react-native-init, and moving the ios folder from the newer project to the official one.
wrong?
yes
but it worked.
maybe this happens when you upgrade your react native version

@raphaelpinel
pod cleanand pod deintegrate are downloadable plugins:
sudo gem install cocoapods-deintegrate cocoapods-clean

Absolutely got myself in a tangled mess with the state of projects/podfiles/caches. I backed out my (very messy) changes then tried the above deintegrate and clean, pow, really unexpected but it was a silver bullet! Reloaded everything and it just worked. Thank you so much for the suggestion.

Still, I'm getting the same error anyone finds a solution for this?  Basically, I'm using react-native-create module lib for but it creates iOS folder without pod file so now i want to use pods and when i'm adding custom pods then i'm getting React/RCTBridgeModule.h file not found

This solution was solved my problem
https://github.com/joltup/rn-fetch-blob/issues/461#issuecomment-553355501


deeplabv2.py code problem

Hi, I'm curious about a line of code in deeplabv2.py
https://github.com/microsoft/ProDA/blob/9ba80c7dbbd23ba1a126e3f4003a72f27d121a1f/models/deeplabv2.py#L123
It seems like return out has an extra indent which makes for loop useless. Or does it has some purpose?
    def forward(self, x):
        out = self.conv2d_list[0](x)
        for i in range(len(self.conv2d_list) - 1):
            out += self.conv2d_list[i + 1](x)
            return out

In fact, performance rely on this bug.


 Issue #26 points out that this is required for some Linux distributions, so I guess we should do that.
I'm leaning towards BSD because it'd be easiest, but let's take a poll of the contributors. If there are objections, we'll discuss further.
@crowell, @cao, @justinclift, @bheesham, @ekse, @MiWCryptoCurrency, @ghedo, @mkevac, @ZetaTwo, @technion, as the exhaustive list of esteemed preeny contributors, do any of you have any objections to a BSD license?

My only conribution was to fix a typo in the readme but BSD is fine with me  :+1:

BSD works for me :+1:

No objections. :+1:

I support BSD license.

Hmmm, BSD license doesn't have patent protection provisions, but it's probably not going to matter for this. :smile:
So BSD... yeah why not. 😁

BSD > Copyleft
I support this.

No objections.
On Mon, Aug 15, 2016 at 1:27 PM Calle Svensson<EMAIL_ADDRESS>wrote:

BSD > Copyleft
I support this.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/zardus/preeny/issues/27#issuecomment-239772709, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAHimGCFWfKBziP757Fh_r3KZH1MyULZks5qgD8ZgaJpZM4JkGPU
.

Bsd is good for me
On Aug 15, 2016 7:49 AM, "Calle Svensson"<EMAIL_ADDRESS>wrote:

BSD > Copyleft
I support this.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/zardus/preeny/issues/27#issuecomment-239772709, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAlnYNN991IhhWCcrWxKt7J4R27nMTRBks5qgD8agaJpZM4JkGPU
.

Issue #26 https://github.com/zardus/preeny/issues/26 points out that
this is required for some Linux distributions, so I guess we should do that.
I'm leaning towards BSD because it'd be easiest, but let's take a poll
of the contributors. If there are objections, we'll discuss further.
@crowell https://github.com/crowell, @cao https://github.com/cao,
@justinclift https://github.com/justinclift, @bheesham
https://github.com/bheesham, @ekse https://github.com/ekse,
@MiWCryptoCurrency https://github.com/MiWCryptoCurrency, @ghedo
https://github.com/ghedo, @mkevac https://github.com/mkevac,
@ZetaTwo https://github.com/ZetaTwo, @technion
https://github.com/technion, as the exhaustive list of esteemed preeny
contributors, do any of you have any objections to a BSD license?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/zardus/preeny/issues/27, or mute the thread
https://github.com/notifications/unsubscribe-auth/AH16TPw449ajNv5Dop4q5Tjh4vw-GPX2ks5qf-UagaJpZM4JkGPU.

Okay! I think we have almost everyone, with no objections. I'll go with BSD!


Support android 4.3 again

Workaround for WebView.evaluateJavascript so that code can run in
android 4.3 too.
Not the cleanest patch (a bit of code duplication), but now Status doesn't crash anymore on my Galaxy S3.

Thanks for contribution, @ugilio!


Enyaq: token exchange fails

As of today for Enyaq:
########################################
#      Logging on to Skoda Connect     #
########################################
Initiating new session to Skoda Connect with<EMAIL_ADDRESS>as username
INFO:skodaconnect.connection:Init Skoda Connect library, version 1.2.5
DEBUG:skodaconnect.connection:Using service https://msg.volkswagen.de
Attempting to login to the Skoda Connect service
2023-01-01 17:44:04.262910
INFO:skodaconnect.connection:Initiating new login
DEBUG:skodaconnect.connection:Starting authorization process for client skoda
DEBUG:skodaconnect.connection:Got redirect to signin-service
DEBUG:skodaconnect.connection:Start authorization for user ...
DEBUG:skodaconnect.connection:Found dynamic credentials form, extracting attributes
DEBUG:skodaconnect.connection:JSON: ...
DEBUG:skodaconnect.connection:Finalizing login
DEBUG:skodaconnect.connection:Received authorization code, exchange for tokens.
ERROR:skodaconnect.connection:An API error was encountered during login, try again later
Traceback (most recent call last):
  File "/Users/andig/htdocs/evcc/test.py", line 319, in <module>
    loop.run_until_complete(main())
  File<EMAIL_ADDRESS>line 649, in run_until_complete
    return future.result()
  File "/Users/andig/htdocs/evcc/test.py", line 154, in main
    if await connection.doLogin():
  File "/opt/homebrew/lib/python3.10/site-packages/skodaconnect/connection.py", line 136, in doLogin
    return await self._authorize('skoda')
  File "/opt/homebrew/lib/python3.10/site-packages/skodaconnect/connection.py", line 276, in _authorize
    raise SkodaException(f'Token exchange failed. Request status: {req.status}')
skodaconnect.exceptions.SkodaException: Token exchange failed. Request status: 400

I'm having the same issue in https://github.com/evcc-io/evcc/issues/5647
Code/ID Token are received but exchange via POST https://tokenrefreshservice.apps.emea.vwapps.io/exchangeAuthCode fails:
HTTP/2.0 400 Bad Request
Content-Length: 76
Content-Type: application/json
Date: Sun, 01 Jan 2023 16:46:33 GMT

{"description":"Invalid identity token.","errorCode":"REQUEST_DATA_INVALID"}

The requets looks as I'd expect it.

I can confirm this issue, I see the same error message.

Same issue here, everything was working until today 2.30pm. Can confirm that the Skoda app works (including changing charge settings etc), also the Skoda website allows me to login and view the details of the vehicle (Enyaq iV60 with me3.0 software)

Same for me with Superb iV:
skodaconnect.exceptions.SkodaException: Token exchange failed. Request status: 400
Skoda-App works as expected.

Working on a solution but so far only native app seems to work and only newer versions (5.x+) which I haven't been able to intercept requests from.
Token exchange procedure seems to have changed and until I can get access to HTTP traces of recent app this issue will persist.
Or if VW Group reverses whatever change they implemented.

I'm using iPhone MySkoda-App version 5.2.7
The app does a really long list of calls which are performed when I enter my credentials in the app. Are there are specific calls you would like to see of the list below?
identity.vwgroup.io/signin-service/v1/
identity.vwgroup.io/oidc/v1/oauth/sso
identity.vwgroup.io/signin-service/v1/consent/users/
identity.vwgroup.io/oidc/v1/oauth/client/callback/success
api.connect.skoda-auto.cz/api/v1/authentication/token
api.connect.skoda-auto.cz/api/v1/users/
identity.vwgroup.io/oidc/v1/authorize
identity.vwgroup.io/oidc/v1/oauth/sso
identity.vwgroup.io/oidc/v1/oauth/client/callback
api.connect.skoda-auto.cz/api/v1/authentication/token
mbboauth-1d.prd.ece.vwg-connect.com
identity.vwgroup.io/oidc/v1/authorize
identity.vwgroup.io/oidc/v1/oauth/sso
identity.vwgroup.io/oidc/v1/oauth/client/callback
api.connect.skoda-auto.cz/api/v1/authentication/token
identity.vwgroup.io/oidc/v1/authorize
identity.vwgroup.io/oidc/v1/oauth/sso
identity.vwgroup.io/oidc/v1/oauth/client/callback
api.connect.skoda-auto.cz/api/v1/authentication/token
customer-profile.apps.emea.vwapps.io/v2/customers
api.connect.skoda-auto.cz/api/v2/preferences
api.connect.skoda-auto.cz/api/v1/vehicles-pre-registrations
api.connect.skoda-auto.cz/api/v3/garage
nc.skoda-connect.com/api/devices/register
sdrive.skod-auto.com

This looks the same as https://github.com/robinostlund/homeassistant-volkswagencarnet/issues/411
There was a temporary workaround suggested with short live sessions. https://github.com/robinostlund/volkswagencarnet/pull/184

The workaround is successful on my site. I can get the data from ma SEAT MII again. TNX

This seems to affect all brands. @RamonQu are you able to trace the entire login sequence and potentially even the token refresh? Afaikt the api.connect.skoda-auto.cz/api/v1/authentication endpoint is new and would be of highest interest. The same would be true for VW and Seat- do they introduce similar (new) endpoints?

See https://github.com/TA2k/ioBroker.vw-connect/issues/225 for more structured attempt at fixing this.

Did not update the integration in ha but it works as from 20 minutes ago. Noticed jedlix and stekker.app suddenly started working again. I guess VW/Skoda reverted their changes?

Did not update the integration in ha but it works as from 20 minutes ago. Noticed jedlix and stekker.app suddenly started working again. I guess VW/Skoda reverted their changes?

Yes I suspect they got blowback from third party integrations (not unofficial ones like this library), smart charging vendors and such, that stopped working.
The only "proof" I have of this is that the old token exchange URL was still "working" only it responded with HTTP 400 Bad Request which indicates that it no longer accepted the information provided.
Also the MySkoda app version 5.2.7 on Android use different URLs for token exchange than the old versions of the app (3.x-4.x) which makes me believe the official apps have updates to handle tokens via brand specific servers instead of this "common" server for all brands and this change was indeed planned.
The change seems to be reverted though and all should be working as before. I have updated the library to 1.3.0 and moved token handling to the new URLs used in version 5.2.7 of the app so this library hopefully will continue working if/when VW Group decides to try implementing this change again.


Request: element_conversion.spherical_to_cartesian_elementwise missing

The element_conversion.spherical_to_cartesian_elementwise() function is missing from the API documentation (but is in my opinion quite a useful function).

Added in this commit:
https://github.com/tudat-team/tudat-multidoc/commit/74c20c75051a69d7137839bae54298ead634e131


fix(streaming): call stream.abort() explicitly when request is aborted

fixes #3032
What is needed in bun?
In bun, when a ReadableStream is returned in the response, cancel() is not called if the connection is disconnected, so the hono needs to listen for the connection to be disconnected.
The following workaround is a strange piece of code, but I think it is acceptable because it would not work without it in bun.
https://github.com/honojs/hono/pull/3042/files#diff-b5c92850aac10e22281695a83a3d6d7a23f5455df59a11c597113914ef427774R14-R18
flaky test
Even stranger still, testing requests with Bun.serve() sometimes fails; I tried a number of patterns, including interspersing setTimeout, but I just couldn't get it to stabilise. The instability seems to occur only in unit tests, so if it succeeds on retry, it is considered OK.
0b15369
The author should do the following, if applicable

[x] Add tests
[x] Run tests
[x] bun run format:fix && bun run lint:fix to format the code
[x] Add TSDoc/JSDoc to document the code

@yusukebe Would you please review?

Hey @usualoma
I may not completely understand the correct behavior, but I think it does not work well in Bun with this PR.
Bun (does not work):
https://github.com/honojs/hono/assets/10682/0eca5e0b-7138-4356-817a-b72918a048e6
Node.js (works):
https://github.com/honojs/hono/assets/10682/e7e611e2-ce23-4ec3-b721-fa34c3b98525
Btw, it has the same behavior as Node.js on Deno.

@usualoma
Is the abort fired when closing the browser?

Ah, we can use this script:
import { Hono } from 'hono'
import { streamSSE } from 'hono/streaming'
import { serve } from '@hono/node-server'

const app = new Hono()

app.get('t', (c) => {
  return streamSSE(c, async (stream) => {
    stream.onAbort(() => {
      console.log('aborted')
      stream.close()
    })
    for (;;) {
      try {
        await stream.writeSSE({
          data: `It is ${new Date().toISOString()}`,
          event: 'message',
        })
        await stream.sleep(1000)
      } catch (e) {
        console.error(e)
        break
      }
    }
  })
})

app.get('/', (c) => {
  return c.html(`
    <html>
      <body>
        <script>
const controller = new AbortController();
const signal = controller.signal;

const eventSource = new EventSource('/t', { signal: signal });

eventSource.onmessage = function(event) {
  console.log('Message:', event.data);
};

eventSource.onerror = function(error) {
  console.log('Error:', error);
  eventSource.close();
};

setTimeout(() => {
  console.log('Aborting connection');
  eventSource.close();
}, 5000);
        </script>
      </body>
    </html>
  `)
})

export default app
//serve(app)

But the behaviors are the same.

@yusukebe Sorry, I think the stream() one is working, but the streamSSE() one was not. Please wait a bit while I fix it.

@yusukebe
I finally understood what we needed.
In a bun, the destruction of c would start when the response was returned, so we needed to suppress that. In 55b6c8c2, I made it so that c is held until a readableStream is destroyed, which solved the problem. This change also made flaky tests more stable.

Hi @usualoma !
Thanks for the investigation and implementation. it works well. Merging now.


Gulp included file twice

Looks like line 90 and 91 includes the same file twice
https://github.com/agershun/alasql/blob/develop/gulpfile.js#L90
Might be an error

It is. Fixed!

ZAAAAAPPPPP - the bug smacher Gershun!


Preload with --require flag?

This doesn't appear to work with the --require flag, as dotenv does. I'm still in the process of debugging to figure out why and see if I can provide a fix, but I figured I'd open a ticket now.

Thanks for contributing @joshuajabbour !

2.2.0 has been released.


@rx-angular/template. Potential issue with globalThis in IE 11.

Disclaimer: haven't tried it yet but tried @ngrx/component
Hi. I don't know if support for IE 11 is planned but now at least PushPipe not working.
app.module configuration: @NgModule({ declarations: [ PushPipe, LetDirective, ...], ...})
Template:
{{ title$ | ngrxPush }}

Console error
"globalThis" не определено = "globalThis" is not defined.

Hi @Karnaukhov-kh.
Thanks a lot, for this input!
could you try if one of those polyfills work for you?

https://github.com/medikoo/es5-ext/blob/master/global.js
https://github.com/ungap/global-this

If yes let me know so I can do further considerations.

Hi. Both works.


Error while running modified prepare_alpaca.py on Linux Mint 21.1

I wanted to try and replace the default alpaca dataset to fine-tune on with Microsoft Research's GPT-4 variant. I cut down the GPT-4 set to match the file size accordingly, then ran into this JSONDecodeError at the very end of the dataset. Kept popping up because I replaced it wrong due to lack of knowledge, but even if I replace it with a part of the original dataset it fails.
It's somewhat similar to #239 and #283.
Traceback (most recent call last)
│ /home/mookie/AI/lit-llama/scripts/prepare_halfgpt4.py:131 in <module>
│
│   128 if __name__ == "__main__":
│   129 │   from jsonargparse import CLI
│   130 │
│ ❱ 131 │   CLI(prepare)
│   132
│
│ /home/mookie/miniconda3/lib/python3.10/site-packages/jsonargparse/cli.py:85 in CLI
│
│    82 │   │   │   return parser
│    83 │   │   cfg = parser.parse_args(args)                                                      │
│    84 │   │   cfg_init = parser.instantiate_classes(cfg)                                         │
│ ❱  85 │   │   return _run_component(component, cfg_init)                                         │
│    86 │                                                                                │
│    87 │   subcommands = parser.add_subcommands(required=True)                                    │
│    88 │   comp_dict = {c.__name__: c for c in components}                                        │
│                                                                                │
│ /home/mookie/miniconda3/lib/python3.10/site-packages/jsonargparse/cli.py:147 in _run_component   │
│                                                                                │
│   144 def _run_component(component, cfg):                                                        │
│   145 │   cfg.pop("config", None)                                                                │
│   146 │   if not inspect.isclass(component):                                                     │
│ ❱ 147 │   │   return component(**cfg)                                                            │
│   148 │   subcommand = cfg.pop("subcommand")                                                     │
│   149 │   if not subcommand:                                                                     │
│   150 │   │   return component(**cfg)                                                            │
│                                                                                │
│ /home/mookie/AI/lit-llama/scripts/prepare_halfgpt4.py:45 in prepare                              │
│                                                                                │
│    42 │   tokenizer = Tokenizer(tokenizer_path)                                                  │
│    43 │                                                                                │
│    44 │   with open(file_path, "r") as file:                                                     │
│ ❱  45 │   │   data = json.load(file)                                                             │
│    46 │                                                                                │
│    47 │   # Partition the dataset into train and test                                            │
│    48 │   train_split_size = len(data) - test_split_size                                         │
│                                                                                │
│ /home/mookie/miniconda3/lib/python3.10/json/__init__.py:293 in load                              │
│                                                                                │
│   290 │   To use a custom ``JSONDecoder`` subclass, specify it with the ``cls``                  │
│   291 │   kwarg; otherwise ``JSONDecoder`` is used.                                              │
│   292 │   """                                                                                │
│ ❱ 293 │   return loads(fp.read(),                                                                │
│   294 │   │   cls=cls, object_hook=object_hook,                                                  │
│   295 │   │   parse_float=parse_float, parse_int=parse_int,                                      │
│   296 │   │   parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)          │
│                                                                                │
│ /home/mookie/miniconda3/lib/python3.10/json/__init__.py:346 in loads                             │
│                                                                                │
│   343 │   if (cls is None and object_hook is None and                                            │
│   344 │   │   │   parse_int is None and parse_float is None and                                  │
│   345 │   │   │   parse_constant is None and object_pairs_hook is None and not kw):              │
│ ❱ 346 │   │   return _default_decoder.decode(s)                                                  │
│   347 │   if cls is None:                                                                        │
│   348 │   │   cls = JSONDecoder                                                                  │
│   349 │   if object_hook is not None:                                                            │
│                                                                                │
│ /home/mookie/miniconda3/lib/python3.10/json/decoder.py:337 in decode                             │
│                                                                                │
│   334 │   │   containing a JSON document).                                                       │
│   335 │   │                                                                                │
│   336 │   │   """                                                                                │
│ ❱ 337 │   │   obj, end = self.raw_decode(s, idx=_w(s, 0).end())                                  │
│   338 │   │   end = _w(s, end).end()                                                             │
│   339 │   │   if end != len(s):                                                                  │
│   340 │   │   │   raise JSONDecodeError("Extra data", s, end)                                    │
│                                                                                │
│ /home/mookie/miniconda3/lib/python3.10/json/decoder.py:353 in raw_decode                         │
│                                                                                │
│   350 │   │                                                                                │
│   351 │   │   """                                                                                │
│   352 │   │   try:                                                                               │
│ ❱ 353 │   │   │   obj, end = self.scan_once(s, idx)                                              │
│   354 │   │   except StopIteration as err:                                                       │
│   355 │   │   │   raise JSONDecodeError("Expecting value", s, err.value) from None               │
│   356 │   │   return obj, end                                                                    │

JSONDecodeError: Expecting ',' delimiter: line 137001 column 1 (char 22579669)
All I did for halfgpt4.py was replace the https:// and file name with a clone of my repo.
Sorry this format is really funky. Hope you can read it ok.

It's complaining about a missing comma in the json file you are loading. Where did you get this file from? Have you tried downloading it again?

It's from https://github.com/Instruction-Tuning-with-GPT-4/GPT-4-LLM. I just cut the file 52k .json to match the size of the default alpaca lit-llama's set for, it's less than a megabyte smaller. The last } is at line 137003.
Here's the last object:
{
"instruction": "Analyze the given legal document and explain the key points.",
"input": "The following is an excerpt from a contract between two parties, labeled "Company A" and "Company B": \n\n"Company A agrees to provide reasonable assistance to Company B in ensuring the accuracy of the financial statements it provides. This includes allowing Company A reasonable access to personnel and other documents which may be necessary for Company B\u2019s review. Company B agrees to maintain the document provided by Company A in confidence, and will not disclose the information to any third parties without Company A\u2019s explicit permission."",
"output": "The contract between Company A and Company B outlines an understanding between the two parties, whereby Company A agrees to provide assistance in ensuring the accuracy of financial statements provided by Company B. This assistance may include providing access to personnel and important documents, as deemed necessary by Company B. In return, Company B agrees to keep the information disclosed by Company A confidential and not share it with any third party without obtaining permission from Company A. This contract aims to promote accuracy and transparency while preserving confidentiality of sensitive information."
}
]

`{
"instruction": "Analyze the given legal document and explain the key points.",
"input": "The following is an excerpt from a contract between two parties, labeled "Company A" and "Company B": \n\n"Company A agrees to provide reasonable assistance to Company B in ensuring the accuracy of the financial statements it provides. This includes allowing Company A reasonable access to personnel and other documents which may be necessary for Company B\u2019s review. Company B agrees to maintain the document provided by Company A in confidence, and will not disclose the information to any third parties without Company A\u2019s explicit permission."",
"output": "The contract between Company A and Company B outlines an understanding between the two parties, whereby Company A agrees to provide assistance in ensuring the accuracy of financial statements provided by Company B. This assistance may include providing access to personnel and important documents, as deemed necessary by Company B. In return, Company B agrees to keep the information disclosed by Company A confidential and not share it with any third party without obtaining permission from Company A. This contract aims to promote accuracy and transparency while preserving confidentiality of sensitive information."
}
]`

Sorry for spam... it's not formatting correctly in the github comments.

I changed OSes to POP! OS and the issue still comes up. Perhaps it's a deeper issue.

I found there's a super slight { indenting change between the custom set and the default set. Also, didn't know you needed to add arguments and full paths for python.lora or llama optimizer, I just read straight "type python lora.py" from finetune/ . I'm 90% confident those were the problems.


Unhandled expression type: VAR

Object destruction declaration in for loop creates a runtime exception.
function random_function() {
    var content = {length: 3};
    for (let k = 0, { length } = content; k < length; k++) {
    }
}

The resulting runtime exception is
java.lang.RuntimeException: INTERNAL COMPILER ERROR.
Please report this problem.

Unhandled expression type: VAR
In scope: random_function() with root: FUNCTION random_function 328 [length: 125] [source_file: test.js] [change_time: 854]
	at com.google.javascript.jscomp.NewTypeInference.analyzeExprFwd(NewTypeInference.java:1683)
	at com.google.javascript.jscomp.NewTypeInference.analyzeConditionalStmFwd(NewTypeInference.java:1057)
	at com.google.javascript.jscomp.NewTypeInference.analyzeFunctionFwd(NewTypeInference.java:989)
	at com.google.javascript.jscomp.NewTypeInference.analyzeFunction(NewTypeInference.java:834)
	at com.google.javascript.jscomp.NewTypeInference.process(NewTypeInference.java:557)
	at com.google.javascript.jscomp.PhaseOptimizer$NamedPass.process(PhaseOptimizer.java:303)
	at com.google.javascript.jscomp.PhaseOptimizer.process(PhaseOptimizer.java:230)
	at com.google.javascript.jscomp.Compiler.check(Compiler.java:1079)
	at com.google.javascript.jscomp.Compiler.performChecksAndTranspilation(Compiler.java:872)
	at com.google.javascript.jscomp.Compiler.access$000(Compiler.java:103)
	at com.google.javascript.jscomp.Compiler$2.call(Compiler.java:806)
	at com.google.javascript.jscomp.Compiler$2.call(Compiler.java:803)
	at com.google.javascript.jscomp.CompilerExecutor$2.call(CompilerExecutor.java:101)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.RuntimeException: Unhandled expression type: VAR
	... 17 more

After some experimenting with the online compiler, I believe I found the reason. However, I am no java coder, so someone else will have to implement these changes. When running with simple optimizations, it errors. When running with advanced optimizations, the online closure compiler instead gives the following warning message.
JSC_UNREACHABLE_CODE: unreachable code at line 3 character 22
    for (let k = 0, { length } = content; k < length; k++) {
                      ^
JSC_TYPE_MISMATCH: right side of numeric comparison
found   : undefined
required: number at line 3 character 42
    for (let k = 0, { length } = content; k < length; k++) {
                                          ^
JSC_UNREACHABLE_CODE: unreachable code at line 3 character 59
    for (let k = 0, { length } = content; k < length; k++) {

I believe the problem is that somewhere in the closure compiler coding, someone erroneously forgot to implement the recursive type checking for that kind of declaration. Basically, in layman's terms, when the compiler sees this: for (let { foo } = {foo: "bar"};;);, closure compiler does NOT thinking that foo is "bar", so it is a string. Rather, the closure compiler essentially ignored the curly brackets around foo and instead assumes foo is the right hand side of the expression ({foo: "bar"}), which is an object value. But, objects cannot be compared without type coercion. So, more evaluation must be done to optimize it. Then during more optimization somewhere else in the closure compiler, they probably coded it correctly and it finds foo to be a string. THEN, the place in the closure compiler code thinking that foo is a string  conflicts with another place that thinks that foo is an object, they clash heads, and the whole thing errors happily ever after.
P.S. If this is just a simple mistake, no one should give the closure compiler people a hard time about this. Honestly, it's pretty amazing how few bugs like this they introduced into a project of this size. All this bug really proves is that the closure compiler people are still humans who make mistakes just like the rest of us.

Looks like the code above actually triggers a transpilation bug, because I get an AST validation error with this.
https://closure-compiler-debugger.appspot.com/#input0%3Dfunction%2520random_function()%2520%257B%250A%2520%2520%2520%2520var%2520content%2520%253D%2520%257Blength%253A%25203%257D%253B%250A%2520%2520%2520%2520for%2520(let%2520k%2520%253D%25200%252C%2520%257B%2520length%2520%257D%2520%253D%2520content%253B%2520k%2520%253C%2520length%253B%2520k%252B%252B)%2520%257B%2520%2520%250A%2520%2520%2520%2520%257D%250A%257D%26input1%26conformanceConfig%26externs%26refasterjs-template%26includeDefaultExterns%3Dtrue%26CHECK_SYMBOLS%3Dtrue%26MISSING_PROPERTIES%3Dtrue%26TRANSPILE%3Dtrue%26CHECK_TYPES%3Dtrue%26CLOSURE_PASS%3Dtrue%26PRESERVE_TYPE_ANNOTATIONS%3Dtrue%26PRETTY_PRINT%3Dtrue
I suspect that destructuring transpilation is breaking the let statement in the for-loop initialization into multiple var statements, which is invalid.

The unit tests for destructuring don't have any for-loop cases with let or with multiple declared variables.
https://github.com/google/closure-compiler/blob/master/test/com/google/javascript/jscomp/Es6RewriteDestructuringTest.java

FYI the above code now throws an error saying we can't transpile it instead of just crashing.
I'm not aware of plans to support transpiling this pattern, though.
https://closure-compiler-debugger.appspot.com/#input0%3Dfunction%2520random_function()%2520%257B%250A%2520%2520%2520%2520var%2520content%2520%253D%2520%257Blength%253A%25203%257D%253B%250A%2520%2520%2520%2520for%2520(let%2520k%2520%253D%25200%252C%2520%257B%2520length%2520%257D%2520%253D%2520content%253B%2520k%2520%253C%2520length%253B%2520k%252B%252B)%2520%257B%2520%2520%250A%2520%2520%2520%2520%257D%250A%257D%26input1%26conformanceConfig%26externs%26refasterjs-template%26includeDefaultExterns%3Dtrue%26CHECK_SYMBOLS%3Dtrue%26MISSING_PROPERTIES%3Dtrue%26TRANSPILE%3Dtrue%26CHECK_TYPES%3Dtrue%26CLOSURE_PASS%3Dtrue%26PRESERVE_TYPE_ANNOTATIONS%3Dtrue%26PRETTY_PRINT%3Dtrue

Perhaps file a new bug for this so that the problem is clear from the description.

Opened https://github.com/google/closure-compiler/issues/3088 to track implementing transpilation of this pattern.


Seems like the project is excluded

I found the same problem. What is happening?

?
I don't understand what you mean by "excluded"?

? I don't understand what you mean by "excluded"?
hey :)
oh, I meant was previously the project was participating in the hacktoberfest now we get it as 'excluded project'.

we have decided to turn this into a code example website

glad to be a part of it :)