sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: next.js
Issue: next build with static-export
Labels: bug,Pages Router

### Link to the code that reproduces this issue

https://codesandbox.io/p/devbox/icy-glitter-f365gw

### To Reproduce

i face the same problem like this, https://github.com/vercel/next.js/issues/51990 i need next static export, and also support api router handler, how to fix it??
just use next build to compile static html, and also use the project to be backend?
the problem that using this same project to play backend, it will produce two same frontend, because next can not only serve api handler



### Current vs. Expected behavior

with next.config something, support next build with static-export, or tell me how to play next only backend

### Provide environment information

```bash
Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 23.0.0: Fri Sep 15 14:41:34 PDT 2023; root:xnu-10002.1.13~1/RELEASE_ARM64_T8103
  Available memory (MB): 16384
  Available CPU cores: 8
Binaries:
  Node: 20.10.0
  npm: 10.2.3
  Yarn: 1.22.21
  pnpm: 8.12.0
Relevant Packages:
  next: 14.2.0-canary.30 // Latest available version is detected (14.2.0-canary.30).
  eslint-config-next: 14.1.0
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.3.3
Next.js Config:
  output: export
```


### Which area(s) are affected? (Select all that apply)

App Router, Data fetching (gS(S)P, getInitialProps), Static HTML Export (output: "export")

### Which stage(s) are affected? (Select all that apply)

next build (local), next start (local)

### Additional context

_No response_
Repository: stable-diffusion-webui
Issue: [Bug]: Checkpoint / LoRA gallery slows down the browser
Labels: bug-report

### Checklist

- [X] The issue exists after disabling all extensions
- [X] The issue exists on a clean installation of webui
- [ ] The issue is caused by an extension, but I believe it is caused by a bug in the webui
- [X] The issue exists in the current version of the webui
- [X] The issue has not been reported before recently
- [ ] The issue has been reported before but has not been fixed yet

### What happened?

Since the last release, the checkpoint / LoRA galleries slow down Firefox to the point that Firefox shows a "This site slows down Firefox [stop]" banner at top of the page, if you have many checkpoints/LoRA.

### Steps to reproduce the problem

1. Have many checkpoints and/or LoRA
2. Click the Checkpoints or LoRa tab

### What should have happened?

Before the last release, it had no noticable delay. Now it takes quite some time until the tab switches, the webui gets unresponsive and Firefox warns that the site is slowing down the browser.

If wonder if it previously had some kind of lazy-loading in place that was removed or similar things. I do not even need to scroll in the last, changing the tab from Generation to Lora alone is enough to slow down the browser before I even see the first rectangle. Most Lora do not have preview images but only the standard grey placeholder.

### What browsers do you use to access the UI ?

Mozilla Firefox

### Sysinfo

(can add later if needed as I would need to remove sensitive information)

### Console logs

```Shell
(I don't see anything relevant)
```


### Additional information

_No response_
Repository: next.js
Issue: The Error boundary is not catching error from server side component.
Labels: bug

### Link to the code that reproduces this issue

https://codesandbox.io/p/devbox/intelligent-kalam-kxkttf

### To Reproduce

Step To Reproduce this Issue

1- Create error.tsx file in app folder to catch error of entire application 
    (src/app/error.tsx)
2- If error is coming for client side component it is working fine 
3 - Create custom hook (to handle API call in our application) in components folder outside app folder , because app folder contains only routes components 
   (src/components/index.ts)
4 - If error is coming from server side components , it is not catching by error.tsx file 

Current Behaviour of Error Boundary
- Any custom <ErrorBoundary /> component will not catch an error that is thrown from a descendent server component, instead it will be uncaught, unless a error.tsx file is defined somewhere for the given route.

Expected Behavior of Error Boundary:
<ErrorBoundary />-like components should catch server errors without needing to be implemented as Route Segment error.tsx files.

### Current vs. Expected behavior

Step To Reproduce this Issue

1- Create error.tsx file in app folder to catch error of entire application 
    (src/app/error.tsx)
2- If error is coming for client side component it is working fine 
3 - Create custom hook (to handle API call in our application) in components folder outside app folder , because app folder contains only routes components 
   (src/components/index.ts)
4 - If error is coming from server side components , it is not catching by error.tsx file 

Current Behaviour of Error Boundary
- Any custom <ErrorBoundary /> component will not catch an error that is thrown from a descendent server component, instead it will be uncaught, unless a error.tsx file is defined somewhere for the given route.

Expected Behavior of Error Boundary:
<ErrorBoundary />-like components should catch server errors without needing to be implemented as Route Segment error.tsx files.

### Provide environment information

```bash
Operating System:
 Platform: windows
 version: windows 11
Binaries :
 Node: v20.11.0
 Yarn: 1.22.19
Relevant Package:
 next: 14.1.0
 react: ^18
 react-dom: ^18
 typescript: ^5
```


### Which area(s) are affected? (Select all that apply)

Not sure

### Which stage(s) are affected? (Select all that apply)

next dev (local), next build (local), next start (local)

### Additional context

_No response_
Repository: pytorch
Issue: Numerical issues on positive semidefiniteness constraint
Labels: module: distributions,triaged

https://github.com/pytorch/pytorch/blob/81683380633f3c79cbf0debc0d491612b152f202/torch/distributions/constraints.py#L545C29-L545C37

For some covariance matrices, this way of calculating the eigenvalue to check for the PSD constraint runs into numerical issues. It yields slightly negative eigenvalues that should actually be zero and therefore rejects the constraint falsely.
One example would be the covariance matrix:
1, 2, 3
2, 4, 6
3, 6, 9
Using sympy.linalg.eigenvals() for example, we can obtain the correct eigenvalues. This should be an option here.

cc @fritzo @neerajprad @alicanb @nikitaved
Repository: vscode
Issue: Allow extensions to contribute contexts to explorer tree nodes so that context menu commands can be conditional
Labels: feature-request,file-explorer

The `FileDecorationProvider` allows showing badges against nodes in the explorer tree.

It would be useful to be able to control  which commands context menu entries show up on in nodes in a similar way. Currently we can set conditions on explorer context menu commands, but we cannot set custom contexts on each node.

For example, let's say I wanted to contribute context menu commands for:

- Add to `search.exclude` (or some similar) setting
- Remove from `search.exclude` (or some similar) setting

Ideally, I'd want only one of these commands to show on the context menu depending on whether the item it already in the setting. I understand context menus are synchronous and VS Code will not ask an extension for commands, however in the same way that the decorations are computed ahead-of-time, if a similar API allowed VS Code to ask for contexts for a node, we could attach these contexts when the tree is built, and then the appropriate context menu command would be shown.

This would reduce the number of items in the explorer context menu where things are only applicable to a subset of nodes, but that cannot be described statically in `package.json`.
Repository: deno
Issue: decipherIV AES-ECB is broken
Labels: bug,node compat,crypto,node API

The `BlockModeCache` does not work correctly with ECB (Electronic Codebook) block mode. 

Cached blocks are not returned for 16-byte buffers.

```javascript
const blockCache = new BlockCache(true); // With aes-XXX-ecb

const input = new Uint8Array(16);
blockCache.add(input)

const cache = blockCache.get(); // This returns `null`
```

Setting `lastChunkIsNotZero` to false fixes the cache retrieval issue but `op_node_crypto_decipheriv` panics:
```
============================================================
Deno has panicked. This is a bug in Deno. Please report this
at https://github.com/denoland/deno/issues/new.
If you can reliably reproduce this panic, include the
reproduction steps and re-run with the RUST_BACKTRACE=1 env
var set and include the backtrace in your report.

Platform: macos aarch64
Version: 1.41.3
Args: ["../../deno/target/debug/deno", "run", "cipher.ts"]

thread 'main' panicked at ext/node/ops/crypto/cipher.rs:362:9:
assertion failed: input.len() == 16
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
```

because `this.#cache.cache` is not 16 byte-aligned.

This whole part needs to be rewritten in Rust.
Repository: next.js
Issue: fetch failed error during build for [lang] folder
Labels: bug

### Link to the code that reproduces this issue

https://codesandbox.io/p/devbox/reverent-hamilton-4j73yv?file=%2Fsrc%2Fapp%2F%5Blang%5D%2Fpricing%2Fpage.tsx&embed=1

### To Reproduce

I'm having trouble with our Next.js project structure and fetching data. We set up our folders like `src/app/[lang]`, and we've been fetching data through API calls within these folders, like getting pricing info from `http://localhost:3000/api/pricing`. We thought we needed to do it this way, but now we understand that we don't have to use an API or route handler to access internal data.

However, we didn't realize our approach was incorrect because when we use these API calls within the `[lang]` folders, we don't get any error messages during the build. It's only when we make these internal API calls outside of the `[lang]` folders that we see a `fetch failed` error.

For example, if I make an internal API call outside the `[lang]` folder, I get a `fetch failed` error. Here's an image showing the error:

![image](https://github.com/vercel/next.js/assets/100203834/e89d9246-d2b7-44de-b8ed-379ba428d54c)

But if I do the same within a `[lang]` folder, the build doesn't show any error and everything works good, build also generated successfully and data are also fetched but ideally it should generate an error. 

You can look at the code from [here](https://codesandbox.io/p/devbox/reverent-hamilton-4j73yv?file=%2Fsrc%2Fapp%2F%5Blang%5D%2Fpricing%2Fpage.tsx&embed=1).

### Current vs. Expected behavior

I think there might be a mistake where error checks for internal API calls aren't enabled for the `[lang]` folder. If it's supposed to show errors outside of `[lang]`, it should do the same inside.

### Provide environment information

```bash
Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:43 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T8112
Binaries:
  Node: 20.9.0
  npm: 10.1.0
  Yarn: 1.22.21
  pnpm: 8.11.0
Relevant Packages:
  next: 14.1.3
  eslint-config-next: 14.1.3
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.4.2
Next.js Config:
  output: N/A
```


### Which area(s) are affected? (Select all that apply)

App Router

### Which stage(s) are affected? (Select all that apply)

next build (local)

### Additional context

_No response_
Repository: opencv
Issue: terminate called after throwing an instance of 'cv::Exception'   what():  OpenCV(4.5.4) ./modules/dnn/src/onnx/onnx_importer.cpp:739: error: (-2:Unspecified error) in function 'handleNode' > Node [Identity]:(onnx::Reshape_395) parse error: OpenCV(4.5.4) ./modules/dnn/src/dnn.cpp:5653: error: (-215:Assertion failed) inputs.size() in function 'getMemoryShapes'
Labels: bug,incomplete

### System Information

opencv :4.5.4
python: 3.8.18
cuda:11.3
cuDNN:8.5
ubuntu:22.04

### Detailed description

Hello
I am executing Tutorial: Deep learning object detection

I am testing whether yolov7 can run. Because MegaPose uses yolov7, I need to run the yolov7 project in the Deep learning object detection tutorial first to make sure that my yolov7 is OK. But I currently encounter the following problem. I want to Please tell me how to solve this problem

### Steps to reproduce

(pytorch-tutorial) mk@mk-ROG-Flow-X16-GV601VI-GV601VI:~/visp-ws/visp-build/tutorial/detection/dnn$ ./tutorial-dnn-object-detection-live --input-json ./default_yolov7.json
Video device : 0
Label file (optional): None
[ WARN:0] global ./modules/videoio/src/cap_gstreamer.cpp (1100) open OpenCV | GStreamer warning: Cannot query video position: status=0, value=-1, duration=-1
[ERROR:0] global ./modules/dnn/src/onnx/onnx_importer.cpp (718) handleNode DNN/ONNX: ERROR during processing node with 1 inputs and 1 outputs: [Identity]:(onnx::Reshape_395)
terminate called after throwing an instance of 'cv::Exception'
what(): OpenCV(4.5.4) ./modules/dnn/src/onnx/onnx_importer.cpp:739: error: (-2:Unspecified error) in function 'handleNode'



### Issue submission checklist

- [X] I report the issue, it's not a question
- [X] I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
- [ ] I updated to the latest OpenCV version and the issue is still there
- [ ] There is reproducer code and related data files (videos, images, onnx, etc)
Repository: PowerToys
Issue: Right to Lefts
Labels: Issue-Bug,Area-Localization,Needs-Triage,Issue-Translation

### Microsoft PowerToys version

0.79.0

### Installation method

Microsoft Store

### Running as admin

Yes

### Area(s) with issue?

General

### Steps to reproduce

When Having sentences with both Hebrew and English, you can't read them. The text is aligned to the left, and it should be aligned to the right in order to be able to read the text.
![צילום מסך 2024-03-19 132443](https://github.com/microsoft/PowerToys/assets/81934673/6580862b-9487-479e-a2d8-dfa15f11dfe3)


### ✔️ Expected Behavior

Right to Left alignment. 

### ❌ Actual Behavior

Left to right alignment

### Other Software

_No response_
Repository: tensorflow
Issue: Selectively build TFLite frameworks failed！
Labels: stat:awaiting tensorflower,type:build/install,iOS,TF 2.16

### Issue type

Build/Install

### Have you reproduced the bug with TensorFlow Nightly?

No

### Source

source

### TensorFlow version

2.16.1

### Custom code

Yes

### OS platform and distribution

13.5

### Mobile device

_No response_

### Python version

3.12.2

### Bazel version

6.5.0

### GCC/compiler version

_No response_

### CUDA/cuDNN version

_No response_

### GPU model and memory

_No response_

### Current behavior?

bash tensorflow/lite/ios/build_frameworks.sh \
  --input_models=migan_8bit_a3.tflite \
  --target_archs=x86_64,armv7,arm64

There were no errors after executing the script, but no such file or directory occurred。

ls: /Users/xxx/Desktop/tensorflow-2.16.1/bazel-out/applebin_ios-ios_sim_arm64-opt-ST-7b90815cfaca/bin/tensorflow/lite/ios/tmp/TensorFlowLiteC_framework.zip: No such file or directory

<img width="1342" alt="image" src="https://github.com/tensorflow/tensorflow/assets/20237703/46de32ea-2a05-4cfe-a22a-845e804aba2b">

but，I found the framework in the “/Users/xxx/Desktop/tensorflow-2.16.1/bazel-out/applebin_ios-ios_sim_arm64-opt-ST-7b90815cfaca/bin/tensorflow/lite/ios/tmp/TensorFlowLiteC_framework.zip” path

I opened the framework and found that its files seemed to be incorrect, Only five files.

![b80526270dda8b60c190a06cbfd18b3d](https://github.com/tensorflow/tensorflow/assets/20237703/a9389c59-7bd7-477e-b2d5-b21de3e36e9b)

![c8f3d0cab9921bd96b65c38c7fcfe671](https://github.com/tensorflow/tensorflow/assets/20237703/47a8567a-643e-4a3d-a684-d33ea5cc76b0)

last，when I build， Xcode show error，not found "builtin_ops. h"




### Standalone code to reproduce the issue

```shell
bash tensorflow/lite/ios/build_frameworks.sh \
  --input_models=migan_8bit_a3.tflite \
  --target_archs=x86_64,armv7,arm64
```


### Relevant log output

```shell
ls: /Users/xxx/Desktop/tensorflow-2.16.1/bazel-out/applebin_ios-ios_sim_arm64-opt-ST-7b90815cfaca/bin/tensorflow/lite/ios/tmp/TensorFlowLiteC_framework.zip: No such file or directory


when I build Xcode，it show error，not found "builtin_ops. h"
```
Repository: PowerToys
Issue: Text extractor moving screen contents
Labels: Issue-Bug,Needs-Triage,Needs-Team-Response,Product-Text Extractor

### Microsoft PowerToys version

0.79.0

### Installation method

PowerToys auto-update

### Running as admin

No

### Area(s) with issue?

TextExtractor

### Steps to reproduce

3x side by side 1080p monitors, center display is primary, snipping tool already open on right screen, launch text extractor (win-shift-T)
![text extractor bug 1 (Large)](https://github.com/microsoft/PowerToys/assets/5025508/d8de5521-df2d-40e3-8ed0-8a302bcf0c13)
![text extractor bug 3](https://github.com/microsoft/PowerToys/assets/5025508/96f029e9-72fa-4d0b-8bbd-ea44babf9e09)


### ✔️ Expected Behavior

screens show their original content with reduced brightness so user can select an area

### ❌ Actual Behavior

right screen displays a duplicate of center monitor with reduced brightness, center and left monitors remain at original brightness and won't allow a selection to be made.
![text extractor bug 2 (Large)](https://github.com/microsoft/PowerToys/assets/5025508/936300ed-a9fd-4c96-93d5-d8d833a82211)


### Other Software

snip and sketch 10.2008.3001.0
Repository: transformers
Issue: [Mamba] Possible Issue in beam search with Mamba HF models
Labels: Feature request

### System Info

nightly build transformers version

### Who can help?

@ArthurZucker 

### Information

- [X] The official example scripts
- [ ] My own modified scripts

### Tasks

- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)

### Reproduction

```
from transformers import AutoModelForCausalLM, AutoTokenizer
device = "cuda:0"
tokenizer = AutoTokenizer.from_pretrained("state-spaces/mamba-130m-hf")
model = AutoModelForCausalLM.from_pretrained("state-spaces/mamba-130m-hf").to(device)

input_prompts = ["Question: Who is the lead singer of Coldplay? Answer:",]
prompted_encoded = tokenizer(input_prompts[0:1], return_tensors="pt", padding=True).to(device)['input_ids']

with torch.inference_mode():
        generated_tokens = model.generate(input_ids=prompted_encoded, max_length=60, use_cache=True, num_beams=5)
        decoded_tokens = tokenizer.batch_decode(generated_tokens)
        print("Generation finished.")
        print(decoded_tokens)
```

### Expected behavior

We are observing a degradation of the mamba model generated output as `num_beams` parameter goes up. 

Example with num_beams=1
```
Generation finished.
['Question: Who is the lead singer of Coldplay? Answer: The lead singer of Coldplay is the lead singer of the band Coldplay.\n\nThe lead singer of Coldplay is the lead singer of the band Coldplay. The lead singer of Coldplay is the lead singer of the band']
```

Example with num_beams=100:
```
Generation finished.
['Question: Who is the lead singer of Coldplay? Answer: Coldplay\n\n\n Cold isfield\n\n\nQuestion:\nColdplayplayfield\n\n\n:\n\n:\n\n:\n\n:\n\n:\n\n:\n\n:\n\n:\n\n:\n']
```
Repository: next.js
Issue: cookies().set inside Server Action is broken when using middleware - dev mode only
Labels: bug,Runtime

### Link to the code that reproduces this issue

https://github.com/padupuy/nextjs-server-action-cookies-middleware-bug

### To Reproduce

In dev mode : 
1. Create a middleware.ts and attach a cookie to the NextResponse
2. Create a server action, create a cookie and redirect the user


https://github.com/vercel/next.js/assets/715255/6da86e81-b209-40fd-a859-fa9930a859cb



### Current vs. Expected behavior

In dev mode : 
I would like to set a cookie A from Server Action and a cookie B from the middleware.ts. 
I found that if only set a cookie A from Server Action without doing anything into middleware.ts it works well.
Unfortunately, if I also set a cookie B inside the middleware, only the cookie B from the middleware is sent to the browser.
I expect that both cookie A and B are sent to the browser 

In the live example, the bug is not present : https://nextjs-server-action-cookies-middleware-bug.vercel.app/

### Provide environment information

```bash
Operating System:
  Platform: darwin
  Arch: x64
  Version: Darwin Kernel Version 23.3.0: Wed Dec 20 21:28:58 PST 2023; root:xnu-10002.81.5~7/RELEASE_X86_64
Binaries:
  Node: 20.9.0
  npm: 10.1.0
  Yarn: 1.22.19
  pnpm: N/A
Relevant Packages:
  next: 14.1.3
  eslint-config-next: 14.1.3
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.4.2
Next.js Config:
  output: N/A
```


### Which area(s) are affected? (Select all that apply)

Middleware / Edge (API routes, runtime)

### Which stage(s) are affected? (Select all that apply)

next dev (local)

### Additional context

_No response_
Repository: rust
Issue: Have a separate `Constructors` section in rustdoc for each type that shows functions that can be used to construct the type.
Labels: T-rustdoc,C-feature-request

When you are reading the documentation of a type sometimes it is difficult to find out, how one should actually create an instance of that type from the documentation.

Having a separate `Constructors` section for each type, would be useful to navigate the documentation and understand how a type should be created (by calling what method/function) in unknown/unfamiliar crates.

Related pr: https://github.com/rust-lang/rust/pull/107926
Repository: ollama
Issue: Error: invalid file magic when importing Safetensors models
Labels: bug

### What is the issue?

> ollama create test -f Modelfile
transferring model data
creating model layer
Error: invalid file magic


This happens for all the **Safetensors** models I try to import.

Modelfile content
`FROM ./model.safetensors`


![Screenshot 2024-03-19 141058](https://github.com/ollama/ollama/assets/16545063/a807e4f9-dfee-4ff4-bc10-cec44167bf9f)


### What did you expect to see?

expect to working :)

### Steps to reproduce

_No response_

### Are there any recent changes that introduced the issue?

_No response_

### OS

Windows

### Architecture

amd64

### Platform

_No response_

### Ollama version

0.1.29

### GPU

Nvidia

### GPU info

_No response_

### CPU

Intel

### Other software

_No response_
Repository: transformers
Issue: [Feature Request] add layer-wise optimizers
Labels: Feature request,optimization

### Feature request

Context: https://github.com/huggingface/transformers/pull/29588#discussion_r1523510004

### Motivation

The layer-wise optimizers is not GaLore-specific. We could apply it to generic optimizers to save memory. For example, the 8bit Adam optimizer paired with the layer-wise optimization sounds like a pretty good option for me.

### Your contribution

Have a try when it is supported
Repository: angular
Issue: Add <search> HTML native tag support
Labels: state: has PR,area: compiler

### Which @angular/* package(s) are relevant/related to the feature request?

compiler

### Description

The new  `<search>` HTML tag is supported by multiple browsers but leads to an NG8001 error with Angular as not part of the [supported HTML tags](https://github.com/angular/angular/blob/main/packages/compiler/src/schema/dom_element_schema_registry.ts#L80).

Thanks @JeanMeche for providing me with the proper HTML listing!

### Proposed solution

Add the HMTL tag to the existing Angular listing

### Alternatives considered

No one considered