Describe the bug
Error executing verb "cluster_graph" in create_base_entity_graph: EmptyNetworkError
With my own dataset, and openai API key.
But do have the extracted entities in the entity_extraction folder and summarize_descriptions folders.
Steps to reproduce
No response
Expected Behavior
No response
GraphRAG Config Used
encoding_model: cl100k_base
skip_workflows: []
llm:
api_key: ${GRAPHRAG_API_KEY}
type: openai_chat # or azure_openai_chat
model: gpt-4-turbo-preview
model: gpt-3.5-turbo-1106
model: gpt-4o-2024-05-13
model_supports_json: true # recommended if this is available for your model.
max_tokens: 4000
request_timeout: 180.0
api_base: https://.openai.azure.com
api_version: 2024-02-15-preview
organization: <organization_id>
deployment_name: <azure_model_deployment_name>
tokens_per_minute: 150_000 # set a leaky bucket throttle
requests_per_minute: 10_000 # set a leaky bucket throttle
max_retries: 10
max_retry_wait: 10.0
sleep_on_rate_limit_recommendation: true # whether to sleep when azure suggests wait-times
concurrent_requests: 25 # the number of parallel inflight requests that may be made
parallelization:
stagger: 0.3
num_threads: 50 # the number of threads to use for parallel processing
async_mode: threaded # or asyncio
embeddings:
parallelization: override the global parallelization settings for embeddings
async_mode: threaded # or asyncio
llm:
api_key: ${GRAPHRAG_API_KEY}
type: openai_embedding # or azure_openai_embedding
model: text-embedding-3-small
# api_base: https://.openai.azure.com
# api_version: 2024-02-15-preview
# organization: <organization_id>
# deployment_name: <azure_model_deployment_name>
# tokens_per_minute: 150_000 # set a leaky bucket throttle
# requests_per_minute: 10_000 # set a leaky bucket throttle
# max_retries: 10
# max_retry_wait: 10.0
# sleep_on_rate_limit_recommendation: true # whether to sleep when azure suggests wait-times
# concurrent_requests: 25 # the number of parallel inflight requests that may be made
# batch_size: 16 # the number of documents to send in a single request
# batch_max_tokens: 8191 # the maximum number of tokens to send in a single request
# target: required # or optional
chunks:
size: 300
overlap: 100
group_by_columns: [id] # by default, we don't allow chunks to cross documents
input:
type: file # or blob
file_type: text # or csv
base_dir: "input"
file_encoding: utf-8
file_pattern: ".*\.txt$"
cache:
type: file # or blob
base_dir: "cache"
connection_string: <azure_blob_storage_connection_string>
container_name: <azure_blob_storage_container_name>
storage:
type: file # or blob
base_dir: "output/${timestamp}/artifacts"
connection_string: <azure_blob_storage_connection_string>
container_name: <azure_blob_storage_container_name>
reporting:
type: file # or console, blob
base_dir: "output/${timestamp}/reports"
connection_string: <azure_blob_storage_connection_string>
container_name: <azure_blob_storage_container_name>
entity_extraction:
llm: override the global llm settings for this task
parallelization: override the global parallelization settings for this task
async_mode: override the global async_mode settings for this task
prompt: "prompts/entity_extraction.txt"
entity_types: [organization,person,geo,event]
max_gleanings: 0
summarize_descriptions:
llm: override the global llm settings for this task
parallelization: override the global parallelization settings for this task
async_mode: override the global async_mode settings for this task
prompt: "prompts/summarize_descriptions.txt"
max_length: 500
claim_extraction:
llm: override the global llm settings for this task
parallelization: override the global parallelization settings for this task
async_mode: override the global async_mode settings for this task
enabled: true
prompt: "prompts/claim_extraction.txt"
description: "Any claims or facts that could be relevant to information discovery."
max_gleanings: 0
community_report:
llm: override the global llm settings for this task
parallelization: override the global parallelization settings for this task
async_mode: override the global async_mode settings for this task
prompt: "prompts/community_report.txt"
max_length: 2000
max_input_length: 8000
cluster_graph:
max_cluster_size: 10
embed_graph:
enabled: false # if true, will generate node2vec embeddings for nodes
num_walks: 10
walk_length: 40
window_size: 2
iterations: 3
random_seed: 597832
umap:
enabled: false # if true, will generate UMAP embeddings for nodes
if we wanna graphml files as output -> turn graphml to true
snapshots:
graphml: false
raw_entities: false
top_level_nodes: false
local_search:
text_unit_prop: 0.5
community_prop: 0.1
conversation_history_max_turns: 5
top_k_mapped_entities: 10
top_k_relationships: 10
max_tokens: 12000
global_search:
max_tokens: 12000
data_max_tokens: 12000
map_max_tokens: 1000
reduce_max_tokens: 2000
concurrency: 32
Logs and screenshots
{"type": "error", "data": "Error executing verb "cluster_graph" in create_base_entity_graph: EmptyNetworkError", "stack": "Traceback (most recent call last):\n  File "/opt/anaconda3/envs/graphrag/lib/python3.11/site-packages/datashaper/workflow/workflow.py", line 410, in _execute_verb\n    result = node.verb.func(**verb_args)\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File "/opt/anaconda3/envs/graphrag/lib/python3.11/site-packages/graphrag/index/verbs/graph/clustering/cluster_graph.py", line 61, in cluster_graph\n    results = output_df[column].apply(lambda graph: run_layout(strategy, graph))\n              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File "/opt/anaconda3/envs/graphrag/lib/python3.11/site-packages/pandas/core/series.py", line 4924, in apply\n    ).apply()\n      ^^^^^^^\n  File "/opt/anaconda3/envs/graphrag/lib/python3.11/site-packages/pandas/core/apply.py", line 1427, in apply\n    return self.apply_standard()\n           ^^^^^^^^^^^^^^^^^^^^^\n  File "/opt/anaconda3/envs/graphrag/lib/python3.11/site-packages/pandas/core/apply.py", line 1507, in apply_standard\n    mapped = obj._map_values(\n             ^^^^^^^^^^^^^^^^\n  File "/opt/anaconda3/envs/graphrag/lib/python3.11/site-packages/pandas/core/base.py", line 921, in _map_values\n    return algorithms.map_array(arr, mapper, na_action=na_action, convert=convert)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File "/opt/anaconda3/envs/graphrag/lib/python3.11/site-packages/pandas/core/algorithms.py", line 1743, in map_array\n    return lib.map_infer(values, mapper, convert=convert)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File "lib.pyx", line 2972, in pandas._libs.lib.map_infer\n  File "/opt/anaconda3/envs/graphrag/lib/python3.11/site-packages/graphrag/index/verbs/graph/clustering/cluster_graph.py", line 61, in \n    results = output_df[column].apply(lambda graph: run_layout(strategy, graph))\n                                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File "/opt/anaconda3/envs/graphrag/lib/python3.11/site-packages/graphrag/index/verbs/graph/clustering/cluster_graph.py", line 171, in run_layout\n    clusters = run_leiden(graph, strategy)\n               ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File "/opt/anaconda3/envs/graphrag/lib/python3.11/site-packages/graphrag/index/verbs/graph/clustering/strategies/leiden.py", line 26, in run\n    node_id_to_community_map = _compute_leiden_communities(\n                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File "/opt/anaconda3/envs/graphrag/lib/python3.11/site-packages/graphrag/index/verbs/graph/clustering/strategies/leiden.py", line 61, in _compute_leiden_communities\n    community_mapping = hierarchical_leiden(\n                        ^^^^^^^^^^^^^^^^^^^^\n  File "<@beartype(graspologic.partition.leiden.hierarchical_leiden) at 0x3233a4860>", line 304, in hierarchical_leiden\n  File "/opt/anaconda3/envs/graphrag/lib/python3.11/site-packages/graspologic/partition/leiden.py", line 588, in hierarchical_leiden\n    hierarchical_clusters_native = gn.hierarchical_leiden(\n                                   ^^^^^^^^^^^^^^^^^^^^^^^\nleiden.EmptyNetworkError: EmptyNetworkError\n", "source": "EmptyNetworkError", "details": null}
{"type": "error", "data": "Error running pipeline!", "stack": "Traceback (most recent call last):\n  File "/opt/anaconda3/envs/graphrag/lib/python3.11/site-packages/graphrag/index/run.py", line 323, in run_pipeline\n    result = await workflow.run(context, callbacks)\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File "/opt/anaconda3/envs/graphrag/lib/python3.11/site-packages/datashaper/workflow/workflow.py", line 369, in run\n    timing = await self._execute_verb(node, context, callbacks)\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File "/opt/anaconda3/envs/graphrag/lib/python3.11/site-packages/datashaper/workflow/workflow.py", line 410, in _execute_verb\n    result = node.verb.func(**verb_args)\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File "/opt/anaconda3/envs/graphrag/lib/python3.11/site-packages/graphrag/index/verbs/graph/clustering/cluster_graph.py", line 61, in cluster_graph\n    results = output_df[column].apply(lambda graph: run_layout(strategy, graph))\n              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File "/opt/anaconda3/envs/graphrag/lib/python3.11/site-packages/pandas/core/series.py", line 4924, in apply\n    ).apply()\n      ^^^^^^^\n  File "/opt/anaconda3/envs/graphrag/lib/python3.11/site-packages/pandas/core/apply.py", line 1427, in apply\n    return self.apply_standard()\n           ^^^^^^^^^^^^^^^^^^^^^\n  File "/opt/anaconda3/envs/graphrag/lib/python3.11/site-packages/pandas/core/apply.py", line 1507, in apply_standard\n    mapped = obj._map_values(\n             ^^^^^^^^^^^^^^^^\n  File "/opt/anaconda3/envs/graphrag/lib/python3.11/site-packages/pandas/core/base.py", line 921, in _map_values\n    return algorithms.map_array(arr, mapper, na_action=na_action, convert=convert)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File "/opt/anaconda3/envs/graphrag/lib/python3.11/site-packages/pandas/core/algorithms.py", line 1743, in map_array\n    return lib.map_infer(values, mapper, convert=convert)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File "lib.pyx", line 2972, in pandas._libs.lib.map_infer\n  File "/opt/anaconda3/envs/graphrag/lib/python3.11/site-packages/graphrag/index/verbs/graph/clustering/cluster_graph.py", line 61, in \n    results = output_df[column].apply(lambda graph: run_layout(strategy, graph))\n                                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File "/opt/anaconda3/envs/graphrag/lib/python3.11/site-packages/graphrag/index/verbs/graph/clustering/cluster_graph.py", line 171, in run_layout\n    clusters = run_leiden(graph, strategy)\n               ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File "/opt/anaconda3/envs/graphrag/lib/python3.11/site-packages/graphrag/index/verbs/graph/clustering/strategies/leiden.py", line 26, in run\n    node_id_to_community_map = _compute_leiden_communities(\n                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File "/opt/anaconda3/envs/graphrag/lib/python3.11/site-packages/graphrag/index/verbs/graph/clustering/strategies/leiden.py", line 61, in _compute_leiden_communities\n    community_mapping = hierarchical_leiden(\n                        ^^^^^^^^^^^^^^^^^^^^\n  File "<@beartype(graspologic.partition.leiden.hierarchical_leiden) at 0x3233a4860>", line 304, in hierarchical_leiden\n  File "/opt/anaconda3/envs/graphrag/lib/python3.11/site-packages/graspologic/partition/leiden.py", line 588, in hierarchical_leiden\n    hierarchical_clusters_native = gn.hierarchical_leiden(\n                                   ^^^^^^^^^^^^^^^^^^^^^^^\nleiden.EmptyNetworkError: EmptyNetworkError\n", "source": "EmptyNetworkError", "details": null}
Additional Information

GraphRAG Version:
Operating System:
Python Version:
Related Issues:

The issue might be due to rate limiting being enforced by endpoints. Please check that the configuration file specifically max_tokens is supported by the model context length you are using.
Alternatively, If you want to use open-source models, I've created a repository for deploying Hugging Face models to local endpoints, offering functionality similar to OpenAI APIs. You can find the repo here: https://github.com/rushizirpe/open-llm-server
Also, I've prepared a Colab notebook for Graphrag Demo here: https://colab.research.google.com/drive/1uhFDnih1WKrSRQHisU-L6xw6coapgR51?usp=sharing.
If you don't have access to GPUs like the A100, you'll need a GROQ_API_KEY (which is free with certain limitations), you can obtain it from: https://console.groq.com/keys

still encountering this issue!

I have same error:
18:13:39,527 graphrag.index.reporting.file_workflow_callbacks INFO Error executing verb "cluster_graph" in create_base_entity_graph: EmptyNetworkError details=None
18:13:39,527 graphrag.index.run ERROR error running workflow create_base_entity_graph
Traceback (most recent call last):
  File "D:\workspace\graphrag\index\run.py", line 323, in run_pipeline
    result = await workflow.run(context, callbacks)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\workspace\venv\Lib\site-packages\datashaper\workflow\workflow.py", line 369, in run
    timing = await self._execute_verb(node, context, callbacks)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\workspace\venv\Lib\site-packages\datashaper\workflow\workflow.py", line 410, in _execute_verb
    result = node.verb.func(**verb_args)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\workspace\graphrag\index\verbs\graph\clustering\cluster_graph.py", line 61, in cluster_graph
    results = output_df[column].apply(lambda graph: run_layout(strategy, graph))
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\workspace\venv\Lib\site-packages\pandas\core\series.py", line 4924, in apply
    ).apply()
      ^^^^^^^
  File "D:\workspace\venv\Lib\site-packages\pandas\core\apply.py", line 1427, in apply
    return self.apply_standard()
           ^^^^^^^^^^^^^^^^^^^^^
  File "D:\workspace\venv\Lib\site-packages\pandas\core\apply.py", line 1507, in apply_standard
    mapped = obj._map_values(
             ^^^^^^^^^^^^^^^^
  File "D:\workspace\venv\Lib\site-packages\pandas\core\base.py", line 921, in _map_values
    return algorithms.map_array(arr, mapper, na_action=na_action, convert=convert)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\workspace\venv\Lib\site-packages\pandas\core\algorithms.py", line 1743, in map_array
    return lib.map_infer(values, mapper, convert=convert)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "lib.pyx", line 2972, in pandas._libs.lib.map_infer
  File "D:\workspace\graphrag\index\verbs\graph\clustering\cluster_graph.py", line 61, in <lambda>
    results = output_df[column].apply(lambda graph: run_layout(strategy, graph))
                                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\workspace\graphrag\index\verbs\graph\clustering\cluster_graph.py", line 167, in run_layout
    clusters = run_leiden(graph, strategy)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\workspace\graphrag\index\verbs\graph\clustering\strategies\leiden.py", line 26, in run
    node_id_to_community_map = _compute_leiden_communities(
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\workspace\graphrag\index\verbs\graph\clustering\strategies\leiden.py", line 61, in _compute_leiden_communities
    community_mapping = hierarchical_leiden(
                        ^^^^^^^^^^^^^^^^^^^^
  File "<@beartype(graspologic.partition.leiden.hierarchical_leiden) at 0x1a3bd57e0c0>", line 304, in hierarchical_leiden
  File "D:\workspace\venv\Lib\site-packages\graspologic\partition\leiden.py", line 588, in hierarchical_leiden
    hierarchical_clusters_native = gn.hierarchical_leiden(
                                   ^^^^^^^^^^^^^^^^^^^^^^^
leiden.EmptyNetworkError: EmptyNetworkError
18:13:39,531 graphrag.index.reporting.file_workflow_callbacks INFO Error running pipeline! details=None

Can folks getting this error upload a full indexing engine.log? The EmptyNetwork error usually happens late in the pipeline and masks a very earlier error with entity extraction, such as an invalid key, incorrect permissions, etc.

v0.3.0  same issue

收到此错误的人们可以上传完整的索引engine.log吗？EmptyNetwork 错误通常发生在管道的后期，并通过实体提取掩盖了非常早期的错误，例如无效的键、不正确的权限等。

11:10:20,172 graphrag.config.read_dotenv INFO Loading pipeline .env file
11:10:20,174 graphrag.index.cli INFO using default configuration: {
"llm": {
"api_key": "REDACTED, length 6",
"type": "openai_chat",
"model": "qwen2:1.5b",
"max_tokens": 1024,
"temperature": 0.0,
"top_p": 1.0,
"request_timeout": 180.0,
"api_base": "http://localhost:11434/v1",
"api_version": null,
"proxy": null,
"cognitive_services_endpoint": null,
"deployment_name": null,
"model_supports_json": true,
"tokens_per_minute": 0,
"requests_per_minute": 0,
"max_retries": 10,
"max_retry_wait": 10.0,
"sleep_on_rate_limit_recommendation": true,
"concurrent_requests": 25
},
"parallelization": {
"stagger": 0.3,
"num_threads": 50
},
"async_mode": "threaded",
"root_dir": "./ragtest",
"reporting": {
"type": "file",
"base_dir": "output/${timestamp}/reports",
"storage_account_blob_url": null
},
"storage": {
"type": "file",
"base_dir": "output/${timestamp}/artifacts",
"storage_account_blob_url": null
},
"cache": {
"type": "file",
"base_dir": "cache",
"storage_account_blob_url": null
},
"input": {
"type": "file",
"file_type": "text",
"base_dir": "input",
"storage_account_blob_url": null,
"encoding": "utf-8",
"file_pattern": ".\.txt$",
"file_filter": null,
"source_column": null,
"timestamp_column": null,
"timestamp_format": null,
"text_column": "text",
"title_column": null,
"document_attribute_columns": []
},
"embed_graph": {
"enabled": false,
"num_walks": 10,
"walk_length": 40,
"window_size": 2,
"iterations": 3,
"random_seed": 597832,
"strategy": null
},
"embeddings": {
"llm": {
"api_key": "REDACTED, length 9",
"type": "openai_embedding",
"model": "nomic-ai/nomic-embed-text-v1.5-GGUF/nomic-embed-text-v1.5.Q5_K_M.gguf",
"max_tokens": 4000,
"temperature": 0,
"top_p": 1,
"request_timeout": 180.0,
"api_base": "http://localhost:1234/v1",
"api_version": null,
"proxy": null,
"cognitive_services_endpoint": null,
"deployment_name": null,
"model_supports_json": null,
"tokens_per_minute": 0,
"requests_per_minute": 0,
"max_retries": 10,
"max_retry_wait": 10.0,
"sleep_on_rate_limit_recommendation": true,
"concurrent_requests": 25
},
"parallelization": {
"stagger": 0.3,
"num_threads": 50
},
"async_mode": "threaded",
"batch_size": 16,
"batch_max_tokens": 8191,
"target": "required",
"skip": [],
"vector_store": null,
"strategy": null
},
"chunks": {
"size": 200,
"overlap": 100,
"group_by_columns": [
"id"
],
"strategy": null
},
"snapshots": {
"graphml": true,
"raw_entities": true,
"top_level_nodes": true
},
"entity_extraction": {
"llm": {
"api_key": "REDACTED, length 6",
"type": "openai_chat",
"model": "qwen2:1.5b",
"max_tokens": 1024,
"temperature": 0.0,
"top_p": 1.0,
"request_timeout": 180.0,
"api_base": "http://localhost:11434/v1",
"api_version": null,
"proxy": null,
"cognitive_services_endpoint": null,
"deployment_name": null,
"model_supports_json": true,
"tokens_per_minute": 0,
"requests_per_minute": 0,
"max_retries": 10,
"max_retry_wait": 10.0,
"sleep_on_rate_limit_recommendation": true,
"concurrent_requests": 25
},
"parallelization": {
"stagger": 0.3,
"num_threads": 50
},
"async_mode": "threaded",
"prompt": "prompts/entity_extraction.txt",
"entity_types": [
"organization",
"person",
"geo",
"event"
],
"max_gleanings": 0,
"strategy": null
},
"summarize_descriptions": {
"llm": {
"api_key": "REDACTED, length 6",
"type": "openai_chat",
"model": "qwen2:1.5b",
"max_tokens": 1024,
"temperature": 0.0,
"top_p": 1.0,
"request_timeout": 180.0,
"api_base": "http://localhost:11434/v1",
"api_version": null,
"proxy": null,
"cognitive_services_endpoint": null,
"deployment_name": null,
"model_supports_json": true,
"tokens_per_minute": 0,
"requests_per_minute": 0,
"max_retries": 10,
"max_retry_wait": 10.0,
"sleep_on_rate_limit_recommendation": true,
"concurrent_requests": 25
},
"parallelization": {
"stagger": 0.3,
"num_threads": 50
},
"async_mode": "threaded",
"prompt": "prompts/summarize_descriptions.txt",
"max_length": 500,
"strategy": null
},
"community_reports": {
"llm": {
"api_key": "REDACTED, length 6",
"type": "openai_chat",
"model": "qwen2:1.5b",
"max_tokens": 1024,
"temperature": 0.0,
"top_p": 1.0,
"request_timeout": 180.0,
"api_base": "http://localhost:11434/v1",
"api_version": null,
"proxy": null,
"cognitive_services_endpoint": null,
"deployment_name": null,
"model_supports_json": true,
"tokens_per_minute": 0,
"requests_per_minute": 0,
"max_retries": 10,
"max_retry_wait": 10.0,
"sleep_on_rate_limit_recommendation": true,
"concurrent_requests": 25
},
"parallelization": {
"stagger": 0.3,
"num_threads": 50
},
"async_mode": "threaded",
"prompt": null,
"max_length": 2000,
"max_input_length": 8000,
"strategy": null
},
"claim_extraction": {
"llm": {
"api_key": "REDACTED, length 6",
"type": "openai_chat",
"model": "qwen2:1.5b",
"max_tokens": 1024,
"temperature": 0.0,
"top_p": 1.0,
"request_timeout": 180.0,
"api_base": "http://localhost:11434/v1",
"api_version": null,
"proxy": null,
"cognitive_services_endpoint": null,
"deployment_name": null,
"model_supports_json": true,
"tokens_per_minute": 0,
"requests_per_minute": 0,
"max_retries": 10,
"max_retry_wait": 10.0,
"sleep_on_rate_limit_recommendation": true,
"concurrent_requests": 25
},
"parallelization": {
"stagger": 0.3,
"num_threads": 50
},
"async_mode": "threaded",
"enabled": false,
"prompt": "prompts/claim_extraction.txt",
"description": "Any claims or facts that could be relevant to information discovery.",
"max_gleanings": 0,
"strategy": null
},
"cluster_graph": {
"max_cluster_size": 10,
"strategy": null
},
"umap": {
"enabled": false
},
"local_search": {
"text_unit_prop": 0.5,
"community_prop": 0.1,
"conversation_history_max_turns": 5,
"top_k_entities": 10,
"top_k_relationships": 10,
"max_tokens": 12000,
"llm_max_tokens": 2000
},
"global_search": {
"temperature": 0.0,
"top_p": 1.0,
"max_tokens": 12000,
"data_max_tokens": 12000,
"map_max_tokens": 1000,
"reduce_max_tokens": 2000,
"concurrency": 32
},
"encoding_model": "cl100k_base",
"skip_workflows": []
}
11:10:20,177 graphrag.index.create_pipeline_config INFO skipping workflows
11:10:20,177 graphrag.index.run INFO Running pipeline
11:10:20,177 graphrag.index.storage.file_pipeline_storage INFO Creating file storage at ragtest\output\20240815-111020\artifacts
11:10:20,178 graphrag.index.input.load_input INFO loading input from root_dir=input
11:10:20,178 graphrag.index.input.load_input INFO using file storage for input
11:10:20,180 graphrag.index.storage.file_pipeline_storage INFO search ragtest\input for files matching ..txt$
11:10:20,180 graphrag.index.input.text INFO found text files from input, found [('CNN_intro.txt', {}), ('GNN_intro.txt', {}), ('machinelearning_intro.txt', {}), ('Transformers_intro.txt', {})]
11:10:20,188 graphrag.index.workflows.load INFO Workflow Run Order: ['create_base_text_units', 'create_base_extracted_entities', 'create_summarized_entities', 'create_base_entity_graph', 'create_final_entities', 'create_final_nodes', 'create_final_communities', 'join_text_units_to_entity_ids', 'create_final_relationships', 'join_text_units_to_relationship_ids', 'create_final_community_reports', 'create_final_text_units', 'create_base_documents', 'create_final_documents']
11:10:20,188 graphrag.index.run INFO Final # of rows loaded: 4
11:10:20,268 graphrag.index.run INFO Running workflow: create_base_text_units...
11:10:20,268 graphrag.index.run INFO dependencies for create_base_text_units: []
11:10:20,271 datashaper.workflow.workflow INFO executing verb orderby
11:10:20,277 datashaper.workflow.workflow INFO executing verb zip
11:10:20,280 datashaper.workflow.workflow INFO executing verb aggregate_override
11:10:20,286 datashaper.workflow.workflow INFO executing verb chunk
11:10:20,423 datashaper.workflow.workflow INFO executing verb select
11:10:20,427 datashaper.workflow.workflow INFO executing verb unroll
11:10:20,432 datashaper.workflow.workflow INFO executing verb rename
11:10:20,436 datashaper.workflow.workflow INFO executing verb genid
11:10:20,440 datashaper.workflow.workflow INFO executing verb unzip
11:10:20,444 datashaper.workflow.workflow INFO executing verb copy
11:10:20,448 datashaper.workflow.workflow INFO executing verb filter
11:10:20,458 graphrag.index.emit.parquet_table_emitter INFO emitting parquet table create_base_text_units.parquet
11:10:20,580 graphrag.index.run INFO Running workflow: create_base_extracted_entities...
11:10:20,580 graphrag.index.run INFO dependencies for create_base_extracted_entities: ['create_base_text_units']
11:10:20,581 graphrag.index.run INFO read table from storage: create_base_text_units.parquet
11:10:20,609 datashaper.workflow.workflow INFO executing verb entity_extract
11:10:20,616 graphrag.llm.openai.create_openai_client INFO Creating OpenAI client base_url=http://localhost:11434/v1
11:10:20,724 graphrag.index.llm.load_llm INFO create TPM/RPM limiter for qwen2:1.5b: TPM=0, RPM=0
11:10:20,724 graphrag.index.llm.load_llm INFO create concurrency limiter for qwen2:1.5b: 25
11:10:26,827 httpx INFO HTTP Request: POST http://localhost:11434/v1/chat/completions "HTTP/1.1 200 OK"
11:10:26,829 graphrag.llm.base.rate_limiting_llm INFO perf - llm.chat "Process" with 0 retries took 6.046999999998661. input_tokens=2134, output_tokens=34
11:10:26,840 httpx INFO HTTP Request: POST http://localhost:11434/v1/chat/completions "HTTP/1.1 200 OK"
11:10:26,841 graphrag.llm.base.rate_limiting_llm INFO perf - llm.chat "Process" with 0 retries took 6.078000000001339. input_tokens=2134, output_tokens=33
11:10:28,800 httpx INFO HTTP Request: POST http://localhost:11434/v1/chat/completions "HTTP/1.1 200 OK"
11:10:28,801 graphrag.llm.base.rate_limiting_llm INFO perf - llm.chat "Process" with 0 retries took 8.04700000000048. input_tokens=2134, output_tokens=35
11:10:33,48 httpx INFO HTTP Request: POST http://localhost:11434/v1/chat/completions "HTTP/1.1 200 OK"
11:10:33,48 graphrag.llm.base.rate_limiting_llm INFO perf - llm.chat "Process" with 0 retries took 12.234000000000378. input_tokens=2134, output_tokens=145
11:10:35,750 httpx INFO HTTP Request: POST http://localhost:11434/v1/chat/completions "HTTP/1.1 200 OK"
11:10:35,751 graphrag.llm.base.rate_limiting_llm INFO perf - llm.chat "Process" with 0 retries took 15.015999999999622. input_tokens=2134, output_tokens=42
11:10:36,679 httpx INFO HTTP Request: POST http://localhost:11434/v1/chat/completions "HTTP/1.1 200 OK"
11:10:36,679 graphrag.llm.base.rate_limiting_llm INFO perf - llm.chat "Process" with 0 retries took 15.906000000000859. input_tokens=1934, output_tokens=135
11:10:43,840 httpx INFO HTTP Request: POST http://localhost:11434/v1/chat/completions "HTTP/1.1 200 OK"
11:10:43,841 graphrag.llm.base.rate_limiting_llm INFO perf - llm.chat "Process" with 0 retries took 23.04700000000048. input_tokens=2134, output_tokens=151
11:10:44,588 httpx INFO HTTP Request: POST http://localhost:11434/v1/chat/completions "HTTP/1.1 200 OK"
11:10:44,588 graphrag.llm.base.rate_limiting_llm INFO perf - llm.chat "Process" with 0 retries took 23.811999999999898. input_tokens=2134, output_tokens=146
11:10:46,574 httpx INFO HTTP Request: POST http://localhost:11434/v1/chat/completions "HTTP/1.1 200 OK"
11:10:46,575 graphrag.llm.base.rate_limiting_llm INFO perf - llm.chat "Process" with 0 retries took 25.82799999999952. input_tokens=2134, output_tokens=409
11:10:51,484 httpx INFO HTTP Request: POST http://localhost:11434/v1/chat/completions "HTTP/1.1 200 OK"
11:10:51,485 graphrag.llm.base.rate_limiting_llm INFO perf - llm.chat "Process" with 0 retries took 30.70299999999952. input_tokens=2134, output_tokens=140
11:10:52,605 httpx INFO HTTP Request: POST http://localhost:11434/v1/chat/completions "HTTP/1.1 200 OK"
11:10:52,607 graphrag.llm.base.rate_limiting_llm INFO perf - llm.chat "Process" with 0 retries took 31.843000000000757. input_tokens=2134, output_tokens=118
11:10:54,617 httpx INFO HTTP Request: POST http://localhost:11434/v1/chat/completions "HTTP/1.1 200 OK"
11:10:54,619 graphrag.llm.base.rate_limiting_llm INFO perf - llm.chat "Process" with 0 retries took 33.85900000000038. input_tokens=2134, output_tokens=36
11:10:57,226 httpx INFO HTTP Request: POST http://localhost:11434/v1/chat/completions "HTTP/1.1 200 OK"
11:10:57,228 graphrag.llm.base.rate_limiting_llm INFO perf - llm.chat "Process" with 0 retries took 36.42200000000048. input_tokens=2134, output_tokens=259
11:10:58,469 httpx INFO HTTP Request: POST http://localhost:11434/v1/chat/completions "HTTP/1.1 200 OK"
11:10:58,470 graphrag.llm.base.rate_limiting_llm INFO perf - llm.chat "Process" with 0 retries took 37.67200000000048. input_tokens=2134, output_tokens=121
11:10:59,955 httpx INFO HTTP Request: POST http://localhost:11434/v1/chat/completions "HTTP/1.1 200 OK"
11:10:59,956 graphrag.llm.base.rate_limiting_llm INFO perf - llm.chat "Process" with 0 retries took 39.15599999999904. input_tokens=2134, output_tokens=32
11:11:01,300 httpx INFO HTTP Request: POST http://localhost:11434/v1/chat/completions "HTTP/1.1 200 OK"
11:11:01,302 graphrag.llm.base.rate_limiting_llm INFO perf - llm.chat "Process" with 0 retries took 40.51599999999962. input_tokens=2082, output_tokens=34
11:11:02,814 httpx INFO HTTP Request: POST http://localhost:11434/v1/chat/completions "HTTP/1.1 200 OK"
11:11:02,815 graphrag.llm.base.rate_limiting_llm INFO perf - llm.chat "Process" with 0 retries took 42.03199999999924. input_tokens=2134, output_tokens=35
11:11:03,261 httpx INFO HTTP Request: POST http://localhost:11434/v1/chat/completions "HTTP/1.1 200 OK"
11:11:03,263 graphrag.llm.base.rate_limiting_llm INFO perf - llm.chat "Process" with 0 retries took 42.48499999999876. input_tokens=2134, output_tokens=126
11:11:04,302 httpx INFO HTTP Request: POST http://localhost:11434/v1/chat/completions "HTTP/1.1 200 OK"
11:11:04,303 graphrag.llm.base.rate_limiting_llm INFO perf - llm.chat "Process" with 0 retries took 43.5. input_tokens=2134, output_tokens=36
11:11:05,473 httpx INFO HTTP Request: POST http://localhost:11434/v1/chat/completions "HTTP/1.1 200 OK"
11:11:05,474 graphrag.llm.base.rate_limiting_llm INFO perf - llm.chat "Process" with 0 retries took 44.71900000000096. input_tokens=2134, output_tokens=36
11:11:08,637 httpx INFO HTTP Request: POST http://localhost:11434/v1/chat/completions "HTTP/1.1 200 OK"
11:11:08,639 graphrag.llm.base.rate_limiting_llm INFO perf - llm.chat "Process" with 0 retries took 47.82799999999952. input_tokens=2134, output_tokens=79
11:11:09,216 httpx INFO HTTP Request: POST http://localhost:11434/v1/chat/completions "HTTP/1.1 200 OK"
11:11:09,218 graphrag.llm.base.rate_limiting_llm INFO perf - llm.chat "Process" with 0 retries took 48.46900000000096. input_tokens=2134, output_tokens=752
11:11:10,935 httpx INFO HTTP Request: POST http://localhost:11434/v1/chat/completions "HTTP/1.1 200 OK"
11:11:10,936 graphrag.llm.base.rate_limiting_llm INFO perf - llm.chat "Process" with 0 retries took 44.11000000000058. input_tokens=2134, output_tokens=29
11:11:12,893 httpx INFO HTTP Request: POST http://localhost:11434/v1/chat/completions "HTTP/1.1 200 OK"
11:11:12,893 graphrag.llm.base.rate_limiting_llm INFO perf - llm.chat "Process" with 0 retries took 46.04699999999866. input_tokens=2134, output_tokens=34
11:11:13,747 httpx INFO HTTP Request: POST http://localhost:11434/v1/chat/completions "HTTP/1.1 200 OK"
11:11:13,749 graphrag.llm.base.rate_limiting_llm INFO perf - llm.chat "Process" with 0 retries took 52.9369999999999. input_tokens=2134, output_tokens=151
11:11:15,849 httpx INFO HTTP Request: POST http://localhost:11434/v1/chat/completions "HTTP/1.1 200 OK"
11:11:15,850 graphrag.llm.base.rate_limiting_llm INFO perf - llm.chat "Process" with 0 retries took 42.79700000000048. input_tokens=2134, output_tokens=36
11:11:17,982 httpx INFO HTTP Request: POST http://localhost:11434/v1/chat/completions "HTTP/1.1 200 OK"
11:11:17,983 graphrag.llm.base.rate_limiting_llm INFO perf - llm.chat "Process" with 0 retries took 42.23400000000038. input_tokens=2134, output_tokens=37
11:11:19,593 httpx INFO HTTP Request: POST http://localhost:11434/v1/chat/completions "HTTP/1.1 200 OK"
11:11:19,595 graphrag.llm.base.rate_limiting_llm INFO perf - llm.chat "Process" with 0 retries took 58.78100000000086. input_tokens=2052, output_tokens=292
11:11:21,778 httpx INFO HTTP Request: POST http://localhost:11434/v1/chat/completions "HTTP/1.1 200 OK"
11:11:21,780 graphrag.llm.base.rate_limiting_llm INFO perf - llm.chat "Process" with 0 retries took 52.98400000000038. input_tokens=2134, output_tokens=152
11:11:21,943 httpx INFO HTTP Request: POST http://localhost:11434/v1/chat/completions "HTTP/1.1 200 OK"
11:11:21,944 graphrag.llm.base.rate_limiting_llm INFO perf - llm.chat "Process" with 0 retries took 38.09399999999914. input_tokens=1959, output_tokens=29
11:11:26,257 httpx INFO HTTP Request: POST http://localhost:11434/v1/chat/completions "HTTP/1.1 200 OK"
11:11:26,260 graphrag.llm.base.rate_limiting_llm INFO perf - llm.chat "Process" with 0 retries took 65.42200000000048. input_tokens=2134, output_tokens=338
11:11:27,188 httpx INFO HTTP Request: POST http://localhost:11434/v1/chat/completions "HTTP/1.1 200 OK"
11:11:27,190 graphrag.llm.base.rate_limiting_llm INFO perf - llm.chat "Process" with 0 retries took 50.51599999999962. input_tokens=2134, output_tokens=198
11:11:27,207 datashaper.workflow.workflow INFO executing verb snapshot
11:11:27,216 datashaper.workflow.workflow INFO executing verb merge_graphs
11:11:27,236 datashaper.workflow.workflow INFO executing verb snapshot_rows
11:11:27,240 graphrag.index.emit.parquet_table_emitter INFO emitting parquet table create_base_extracted_entities.parquet
11:11:27,425 graphrag.index.run INFO Running workflow: create_summarized_entities...
11:11:27,425 graphrag.index.run INFO dependencies for create_summarized_entities: ['create_base_extracted_entities']
11:11:27,426 graphrag.index.run INFO read table from storage: create_base_extracted_entities.parquet
11:11:27,454 datashaper.workflow.workflow INFO executing verb summarize_descriptions
11:11:30,49 httpx INFO HTTP Request: POST http://localhost:11434/v1/chat/completions "HTTP/1.1 200 OK"
11:11:30,50 graphrag.llm.base.rate_limiting_llm INFO perf - llm.chat "summarize" with 0 retries took 2.5310000000008586. input_tokens=156, output_tokens=38
11:11:30,971 httpx INFO HTTP Request: POST http://localhost:11434/v1/chat/completions "HTTP/1.1 200 OK"
11:11:30,972 graphrag.llm.base.rate_limiting_llm INFO perf - llm.chat "summarize" with 0 retries took 3.485000000000582. input_tokens=188, output_tokens=62
11:11:32,47 httpx INFO HTTP Request: POST http://localhost:11434/v1/chat/completions "HTTP/1.1 200 OK"
11:11:32,48 graphrag.llm.base.rate_limiting_llm INFO perf - llm.chat "summarize" with 0 retries took 4.57799999999952. input_tokens=212, output_tokens=82
11:11:33,386 httpx INFO HTTP Request: POST http://localhost:11434/v1/chat/completions "HTTP/1.1 200 OK"
11:11:33,388 graphrag.llm.base.rate_limiting_llm INFO perf - llm.chat "summarize" with 0 retries took 5.890999999999622. input_tokens=189, output_tokens=64
11:11:34,0 httpx INFO HTTP Request: POST http://localhost:11434/v1/chat/completions "HTTP/1.1 200 OK"
11:11:34,1 graphrag.llm.base.rate_limiting_llm INFO perf - llm.chat "summarize" with 0 retries took 6.5. input_tokens=169, output_tokens=38
11:11:35,63 httpx INFO HTTP Request: POST http://localhost:11434/v1/chat/completions "HTTP/1.1 200 OK"
11:11:35,65 graphrag.llm.base.rate_limiting_llm INFO perf - llm.chat "summarize" with 0 retries took 7.5789999999997235. input_tokens=167, output_tokens=86
11:11:35,142 httpx INFO HTTP Request: POST http://localhost:11434/v1/chat/completions "HTTP/1.1 200 OK"
11:11:35,144 graphrag.llm.base.rate_limiting_llm INFO perf - llm.chat "summarize" with 0 retries took 7.640999999999622. input_tokens=247, output_tokens=147
11:11:35,165 datashaper.workflow.workflow INFO executing verb snapshot_rows
11:11:35,172 graphrag.index.emit.parquet_table_emitter INFO emitting parquet table create_summarized_entities.parquet
11:11:35,367 graphrag.index.run INFO Running workflow: create_base_entity_graph...
11:11:35,367 graphrag.index.run INFO dependencies for create_base_entity_graph: ['create_summarized_entities']
11:11:35,368 graphrag.index.run INFO read table from storage: create_summarized_entities.parquet
11:11:35,399 datashaper.workflow.workflow INFO executing verb cluster_graph
11:11:35,410 datashaper.workflow.workflow ERROR Error executing verb "cluster_graph" in create_base_entity_graph: EmptyNetworkError
Traceback (most recent call last):
File "D:\software\Anaconda3\envs\graphrag\lib\site-packages\datashaper\workflow\workflow.py", line 410, in _execute_verb
result = node.verb.func(**verb_args)
File "E:\learn\graphrag\graphrag-local-ollama-main\graphrag\index\verbs\graph\clustering\cluster_graph.py", line 61, in cluster_graph
results = output_df[column].apply(lambda graph: run_layout(strategy, graph))
File "D:\software\Anaconda3\envs\graphrag\lib\site-packages\pandas\core\series.py", line 4924, in apply
).apply()
File "D:\software\Anaconda3\envs\graphrag\lib\site-packages\pandas\core\apply.py", line 1427, in apply
return self.apply_standard()
File "D:\software\Anaconda3\envs\graphrag\lib\site-packages\pandas\core\apply.py", line 1507, in apply_standard
mapped = obj._map_values(
File "D:\software\Anaconda3\envs\graphrag\lib\site-packages\pandas\core\base.py", line 921, in _map_values
return algorithms.map_array(arr, mapper, na_action=na_action, convert=convert)
File "D:\software\Anaconda3\envs\graphrag\lib\site-packages\pandas\core\algorithms.py", line 1743, in map_array
return lib.map_infer(values, mapper, convert=convert)
File "lib.pyx", line 2972, in pandas._libs.lib.map_infer
File "E:\learn\graphrag\graphrag-local-ollama-main\graphrag\index\verbs\graph\clustering\cluster_graph.py", line 61, in
results = output_df[column].apply(lambda graph: run_layout(strategy, graph))
File "E:\learn\graphrag\graphrag-local-ollama-main\graphrag\index\verbs\graph\clustering\cluster_graph.py", line 167, in run_layout
clusters = run_leiden(graph, strategy)
File "E:\learn\graphrag\graphrag-local-ollama-main\graphrag\index\verbs\graph\clustering\strategies\leiden.py", line 26, in run
node_id_to_community_map = _compute_leiden_communities(
File "E:\learn\graphrag\graphrag-local-ollama-main\graphrag\index\verbs\graph\clustering\strategies\leiden.py", line 61, in _compute_leiden_communities
community_mapping = hierarchical_leiden(
File "<@beartype(graspologic.partition.leiden.hierarchical_leiden) at 0x21ab70e1510>", line 304, in hierarchical_leiden
File "D:\software\Anaconda3\envs\graphrag\lib\site-packages\graspologic\partition\leiden.py", line 588, in hierarchical_leiden
hierarchical_clusters_native = gn.hierarchical_leiden(
leiden.EmptyNetworkError: EmptyNetworkError
11:11:35,433 graphrag.index.reporting.file_workflow_callbacks INFO Error executing verb "cluster_graph" in create_base_entity_graph: EmptyNetworkError details=None
11:11:35,433 graphrag.index.run ERROR error running workflow create_base_entity_graph
Traceback (most recent call last):
File "E:\learn\graphrag\graphrag-local-ollama-main\graphrag\index\run.py", line 323, in run_pipeline
result = await workflow.run(context, callbacks)
File "D:\software\Anaconda3\envs\graphrag\lib\site-packages\datashaper\workflow\workflow.py", line 369, in run
timing = await self._execute_verb(node, context, callbacks)
File "D:\software\Anaconda3\envs\graphrag\lib\site-packages\datashaper\workflow\workflow.py", line 410, in _execute_verb
result = node.verb.func(**verb_args)
File "E:\learn\graphrag\graphrag-local-ollama-main\graphrag\index\verbs\graph\clustering\cluster_graph.py", line 61, in cluster_graph
results = output_df[column].apply(lambda graph: run_layout(strategy, graph))
File "D:\software\Anaconda3\envs\graphrag\lib\site-packages\pandas\core\series.py", line 4924, in apply
).apply()
File "D:\software\Anaconda3\envs\graphrag\lib\site-packages\pandas\core\apply.py", line 1427, in apply
return self.apply_standard()
File "D:\software\Anaconda3\envs\graphrag\lib\site-packages\pandas\core\apply.py", line 1507, in apply_standard
mapped = obj._map_values(
File "D:\software\Anaconda3\envs\graphrag\lib\site-packages\pandas\core\base.py", line 921, in _map_values
return algorithms.map_array(arr, mapper, na_action=na_action, convert=convert)
File "D:\software\Anaconda3\envs\graphrag\lib\site-packages\pandas\core\algorithms.py", line 1743, in map_array
return lib.map_infer(values, mapper, convert=convert)
File "lib.pyx", line 2972, in pandas._libs.lib.map_infer
File "E:\learn\graphrag\graphrag-local-ollama-main\graphrag\index\verbs\graph\clustering\cluster_graph.py", line 61, in
results = output_df[column].apply(lambda graph: run_layout(strategy, graph))
File "E:\learn\graphrag\graphrag-local-ollama-main\graphrag\index\verbs\graph\clustering\cluster_graph.py", line 167, in run_layout
clusters = run_leiden(graph, strategy)
File "E:\learn\graphrag\graphrag-local-ollama-main\graphrag\index\verbs\graph\clustering\strategies\leiden.py", line 26, in run
node_id_to_community_map = _compute_leiden_communities(
File "E:\learn\graphrag\graphrag-local-ollama-main\graphrag\index\verbs\graph\clustering\strategies\leiden.py", line 61, in _compute_leiden_communities
community_mapping = hierarchical_leiden(
File "<@beartype(graspologic.partition.leiden.hierarchical_leiden) at 0x21ab70e1510>", line 304, in hierarchical_leiden
File "D:\software\Anaconda3\envs\graphrag\lib\site-packages\graspologic\partition\leiden.py", line 588, in hierarchical_leiden
hierarchical_clusters_native = gn.hierarchical_leiden(
leiden.EmptyNetworkError: EmptyNetworkError
11:11:35,437 graphrag.index.reporting.file_workflow_callbacks INFO Error running pipeline! details=None

indexing-engine.log
settings.txt
I have the same error, attach is indexing-engine.log and settings.yaml

still having this error
{     "type": "error",     "data": "Error executing verb \"cluster_graph\" in create_base_entity_graph: EmptyNetworkError",     "stack": "Traceback (most recent call last):\n  File \"/home/zzm/anaconda3/envs/nodule_detection/lib/python3.10/site-packages/datashaper/workflow/workflow.py\", line 410, in _execute_verb\n    result = node.verb.func(**verb_args)\n  File \"/home/zzm/anaconda3/envs/nodule_detection/lib/python3.10/site-packages/graphrag/index/verbs/graph/clustering/cluster_graph.py\", line 61, in cluster_graph\n    results = output_df[column].apply(lambda graph: run_layout(strategy, graph))\n  File \"/home/zzm/anaconda3/envs/nodule_detection/lib/python3.10/site-packages/pandas/core/series.py\", line 4924, in apply\n    ).apply()\n  File \"/home/zzm/anaconda3/envs/nodule_detection/lib/python3.10/site-packages/pandas/core/apply.py\", line 1427, in apply\n    return self.apply_standard()\n  File \"/home/zzm/anaconda3/envs/nodule_detection/lib/python3.10/site-packages/pandas/core/apply.py\", line 1507, in apply_standard\n    mapped = obj._map_values(\n  File \"/home/zzm/anaconda3/envs/nodule_detection/lib/python3.10/site-packages/pandas/core/base.py\", line 921, in _map_values\n    return algorithms.map_array(arr, mapper, na_action=na_action, convert=convert)\n  File \"/home/zzm/anaconda3/envs/nodule_detection/lib/python3.10/site-packages/pandas/core/algorithms.py\", line 1743, in map_array\n    return lib.map_infer(values, mapper, convert=convert)\n  File \"lib.pyx\", line 2972, in pandas._libs.lib.map_infer\n  File \"/home/zzm/anaconda3/envs/nodule_detection/lib/python3.10/site-packages/graphrag/index/verbs/graph/clustering/cluster_graph.py\", line 61, in <lambda>\n    results = output_df[column].apply(lambda graph: run_layout(strategy, graph))\n  File \"/home/zzm/anaconda3/envs/nodule_detection/lib/python3.10/site-packages/graphrag/index/verbs/graph/clustering/cluster_graph.py\", line 171, in run_layout\n    clusters = run_leiden(graph, strategy)\n  File \"/home/zzm/anaconda3/envs/nodule_detection/lib/python3.10/site-packages/graphrag/index/verbs/graph/clustering/strategies/leiden.py\", line 26, in run\n    node_id_to_community_map = _compute_leiden_communities(\n  File \"/home/zzm/anaconda3/envs/nodule_detection/lib/python3.10/site-packages/graphrag/index/verbs/graph/clustering/strategies/leiden.py\", line 61, in _compute_leiden_communities\n    community_mapping = hierarchical_leiden(\n  File \"<@beartype(graspologic.partition.leiden.hierarchical_leiden) at 0x7f5c9904ee60>\", line 304, in hierarchical_leiden\n  File \"/home/zzm/anaconda3/envs/nodule_detection/lib/python3.10/site-packages/graspologic/partition/leiden.py\", line 588, in hierarchical_leiden\n    hierarchical_clusters_native = gn.hierarchical_leiden(\nleiden.EmptyNetworkError: EmptyNetworkError\n",     "source": "EmptyNetworkError",     "details": null } {     "type": "error",     "data": "Error running pipeline!",     "stack": "Traceback (most recent call last):\n  File \"/home/zzm/anaconda3/envs/nodule_detection/lib/python3.10/site-packages/graphrag/index/run/run.py\", line 227, in run_pipeline\n    result = await _process_workflow(\n  File \"/home/zzm/anaconda3/envs/nodule_detection/lib/python3.10/site-packages/graphrag/index/run/workflow.py\", line 91, in _process_workflow\n    result = await workflow.run(context, callbacks)\n  File \"/home/zzm/anaconda3/envs/nodule_detection/lib/python3.10/site-packages/datashaper/workflow/workflow.py\", line 369, in run\n    timing = await self._execute_verb(node, context, callbacks)\n  File \"/home/zzm/anaconda3/envs/nodule_detection/lib/python3.10/site-packages/datashaper/workflow/workflow.py\", line 410, in _execute_verb\n    result = node.verb.func(**verb_args)\n  File \"/home/zzm/anaconda3/envs/nodule_detection/lib/python3.10/site-packages/graphrag/index/verbs/graph/clustering/cluster_graph.py\", line 61, in cluster_graph\n    results = output_df[column].apply(lambda graph: run_layout(strategy, graph))\n  File \"/home/zzm/anaconda3/envs/nodule_detection/lib/python3.10/site-packages/pandas/core/series.py\", line 4924, in apply\n    ).apply()\n  File \"/home/zzm/anaconda3/envs/nodule_detection/lib/python3.10/site-packages/pandas/core/apply.py\", line 1427, in apply\n    return self.apply_standard()\n  File \"/home/zzm/anaconda3/envs/nodule_detection/lib/python3.10/site-packages/pandas/core/apply.py\", line 1507, in apply_standard\n    mapped = obj._map_values(\n  File \"/home/zzm/anaconda3/envs/nodule_detection/lib/python3.10/site-packages/pandas/core/base.py\", line 921, in _map_values\n    return algorithms.map_array(arr, mapper, na_action=na_action, convert=convert)\n  File \"/home/zzm/anaconda3/envs/nodule_detection/lib/python3.10/site-packages/pandas/core/algorithms.py\", line 1743, in map_array\n    return lib.map_infer(values, mapper, convert=convert)\n  File \"lib.pyx\", line 2972, in pandas._libs.lib.map_infer\n  File \"/home/zzm/anaconda3/envs/nodule_detection/lib/python3.10/site-packages/graphrag/index/verbs/graph/clustering/cluster_graph.py\", line 61, in <lambda>\n    results = output_df[column].apply(lambda graph: run_layout(strategy, graph))\n  File \"/home/zzm/anaconda3/envs/nodule_detection/lib/python3.10/site-packages/graphrag/index/verbs/graph/clustering/cluster_graph.py\", line 171, in run_layout\n    clusters = run_leiden(graph, strategy)\n  File \"/home/zzm/anaconda3/envs/nodule_detection/lib/python3.10/site-packages/graphrag/index/verbs/graph/clustering/strategies/leiden.py\", line 26, in run\n    node_id_to_community_map = _compute_leiden_communities(\n  File \"/home/zzm/anaconda3/envs/nodule_detection/lib/python3.10/site-packages/graphrag/index/verbs/graph/clustering/strategies/leiden.py\", line 61, in _compute_leiden_communities\n    community_mapping = hierarchical_leiden(\n  File \"<@beartype(graspologic.partition.leiden.hierarchical_leiden) at 0x7f5c9904ee60>\", line 304, in hierarchical_leiden\n  File \"/home/zzm/anaconda3/envs/nodule_detection/lib/python3.10/site-packages/graspologic/partition/leiden.py\", line 588, in hierarchical_leiden\n    hierarchical_clusters_native = gn.hierarchical_leiden(\nleiden.EmptyNetworkError: EmptyNetworkError\n",     "source": "EmptyNetworkError",     "details": null }

01:05:27,808 datashaper.workflow.workflow ERROR Error executing verb "cluster_graph" in create_base_entity_graph: EmptyNetworkError
Traceback (most recent call last):
  File "/opt/conda/envs/graphrag/lib/python3.10/site-packages/datashaper/workflow/workflow.py", line 410, in _execute_verb
    result = node.verb.func(**verb_args)
  File "/inspire/hdd/ws-c6f77a66-a5f5-45dc-a4ce-1e856fe7a7b4/project/hejunjun-24017/jiyao/Project/llm-graph-rag-master/graphrag/index/verbs/graph/clustering/cluster_graph.py", line 61, in cluster_graph
    results = output_df[column].apply(lambda graph: run_layout(strategy, graph))
  File "/opt/conda/envs/graphrag/lib/python3.10/site-packages/pandas/core/series.py", line 4924, in apply
    ).apply()
  File "/opt/conda/envs/graphrag/lib/python3.10/site-packages/pandas/core/apply.py", line 1427, in apply
    return self.apply_standard()
  File "/opt/conda/envs/graphrag/lib/python3.10/site-packages/pandas/core/apply.py", line 1507, in apply_standard
    mapped = obj._map_values(
  File "/opt/conda/envs/graphrag/lib/python3.10/site-packages/pandas/core/base.py", line 921, in _map_values
    return algorithms.map_array(arr, mapper, na_action=na_action, convert=convert)
  File "/opt/conda/envs/graphrag/lib/python3.10/site-packages/pandas/core/algorithms.py", line 1743, in map_array
    return lib.map_infer(values, mapper, convert=convert)
  File "lib.pyx", line 2972, in pandas._libs.lib.map_infer
  File "/inspire/hdd/ws-c6f77a66-a5f5-45dc-a4ce-1e856fe7a7b4/project/hejunjun-24017/jiyao/Project/llm-graph-rag-master/graphrag/index/verbs/graph/clustering/cluster_graph.py", line 61, in <lambda>
    results = output_df[column].apply(lambda graph: run_layout(strategy, graph))
  File "/inspire/hdd/ws-c6f77a66-a5f5-45dc-a4ce-1e856fe7a7b4/project/hejunjun-24017/jiyao/Project/llm-graph-rag-master/graphrag/index/verbs/graph/clustering/cluster_graph.py", line 167, in run_layout
    clusters = run_leiden(graph, strategy)
  File "/inspire/hdd/ws-c6f77a66-a5f5-45dc-a4ce-1e856fe7a7b4/project/hejunjun-24017/jiyao/Project/llm-graph-rag-master/graphrag/index/verbs/graph/clustering/strategies/leiden.py", line 26, in run
    node_id_to_community_map = _compute_leiden_communities(
  File "/inspire/hdd/ws-c6f77a66-a5f5-45dc-a4ce-1e856fe7a7b4/project/hejunjun-24017/jiyao/Project/llm-graph-rag-master/graphrag/index/verbs/graph/clustering/strategies/leiden.py", line 61, in _compute_leiden_communities
    community_mapping = hierarchical_leiden(
  File "<@beartype(graspologic.partition.leiden.hierarchical_leiden) at 0x7f7bd58beb90>", line 304, in hierarchical_leiden
  File "/opt/conda/envs/graphrag/lib/python3.10/site-packages/graspologic/partition/leiden.py", line 588, in hierarchical_leiden
    hierarchical_clusters_native = gn.hierarchical_leiden(
leiden.EmptyNetworkError: EmptyNetworkError
01:05:27,810 graphrag.index.reporting.file_workflow_callbacks INFO Error executing verb "cluster_graph" in create_base_entity_graph: EmptyNetworkError details=None
01:05:27,810 graphrag.index.run ERROR error running workflow create_base_entity_graph
Traceback (most recent call last):
  File "/inspire/hdd/ws-c6f77a66-a5f5-45dc-a4ce-1e856fe7a7b4/project/hejunjun-24017/jiyao/Project/llm-graph-rag-master/graphrag/index/run.py", line 327, in run_pipeline
    result = await workflow.run(context, callbacks)
  File "/opt/conda/envs/graphrag/lib/python3.10/site-packages/datashaper/workflow/workflow.py", line 369, in run
    timing = await self._execute_verb(node, context, callbacks)
  File "/opt/conda/envs/graphrag/lib/python3.10/site-packages/datashaper/workflow/workflow.py", line 410, in _execute_verb
    result = node.verb.func(**verb_args)
  File "/inspire/hdd/ws-c6f77a66-a5f5-45dc-a4ce-1e856fe7a7b4/project/hejunjun-24017/jiyao/Project/llm-graph-rag-master/graphrag/index/verbs/graph/clustering/cluster_graph.py", line 61, in cluster_graph
    results = output_df[column].apply(lambda graph: run_layout(strategy, graph))
  File "/opt/conda/envs/graphrag/lib/python3.10/site-packages/pandas/core/series.py", line 4924, in apply
    ).apply()
  File "/opt/conda/envs/graphrag/lib/python3.10/site-packages/pandas/core/apply.py", line 1427, in apply
    return self.apply_standard()
  File "/opt/conda/envs/graphrag/lib/python3.10/site-packages/pandas/core/apply.py", line 1507, in apply_standard
    mapped = obj._map_values(
  File "/opt/conda/envs/graphrag/lib/python3.10/site-packages/pandas/core/base.py", line 921, in _map_values
    return algorithms.map_array(arr, mapper, na_action=na_action, convert=convert)
  File "/opt/conda/envs/graphrag/lib/python3.10/site-packages/pandas/core/algorithms.py", line 1743, in map_array
    return lib.map_infer(values, mapper, convert=convert)
  File "lib.pyx", line 2972, in pandas._libs.lib.map_infer
  File "/inspire/hdd/ws-c6f77a66-a5f5-45dc-a4ce-1e856fe7a7b4/project/hejunjun-24017/jiyao/Project/llm-graph-rag-master/graphrag/index/verbs/graph/clustering/cluster_graph.py", line 61, in <lambda>
    results = output_df[column].apply(lambda graph: run_layout(strategy, graph))
  File "/inspire/hdd/ws-c6f77a66-a5f5-45dc-a4ce-1e856fe7a7b4/project/hejunjun-24017/jiyao/Project/llm-graph-rag-master/graphrag/index/verbs/graph/clustering/cluster_graph.py", line 167, in run_layout
    clusters = run_leiden(graph, strategy)
  File "/inspire/hdd/ws-c6f77a66-a5f5-45dc-a4ce-1e856fe7a7b4/project/hejunjun-24017/jiyao/Project/llm-graph-rag-master/graphrag/index/verbs/graph/clustering/strategies/leiden.py", line 26, in run
    node_id_to_community_map = _compute_leiden_communities(
  File "/inspire/hdd/ws-c6f77a66-a5f5-45dc-a4ce-1e856fe7a7b4/project/hejunjun-24017/jiyao/Project/llm-graph-rag-master/graphrag/index/verbs/graph/clustering/strategies/leiden.py", line 61, in _compute_leiden_communities
    community_mapping = hierarchical_leiden(
  File "<@beartype(graspologic.partition.leiden.hierarchical_leiden) at 0x7f7bd58beb90>", line 304, in hierarchical_leiden
  File "/opt/conda/envs/graphrag/lib/python3.10/site-packages/graspologic/partition/leiden.py", line 588, in hierarchical_leiden
    hierarchical_clusters_native = gn.hierarchical_leiden(
leiden.EmptyNetworkError: EmptyNetworkError
01:05:27,811 graphrag.index.reporting.file_workflow_callbacks INFO Error running pipeline! details=None

I encountered a similar issue as well. May I ask if there's a solution?
Here is my .env file configured with Ollama:
GRAPHRAG_API_BASE=http://localhost:11434/v1
GRAPHRAG_CHAT_API_KEY=ollama
GRAPHRAG_CHAT_MODEL=qwen2:latest
GRAPHRAG_EMBEDDING_API_KEY=ollama
GRAPHRAG_EMBEDDING_MODEL=nomic-embed-text:latest


Challenge completion celebration

As a learner, when I complete a challenge, I should be exhilarated and encouraged by completing a challenge.
Possibilities:

Modal drop on completion with congratulations with some advancement of the narrative (and possible payout?)
An improved version of the completion banner

Is this a duplicate of #53 ?

@GBKS any input on this one?

Something we should tackle, for sure. Have not thought super deeply about it, but here are some ideas:

The inputted text turns a celebratory green when it's correct (see here)
Change "Challenge completed" to be more informational and unique (see here)
Some kind of elaborate animation that's fun and playful (Duolingo does this well, some info here). I have not looked much into animation since there has been more basic stuff to take care of

It would be great if we can explore animations. That would 10x the endorphines! If someone investigates how to integrate animations, design can help create something for eng to implement?

Most of the UI animations (really transitions) we need can be handled via the React/Next built-in transition functionality. For more elaborate animations, like drawing out Elliptic Curve Cryptography math, we may need to set up Lottie.

I just got assigned this, so one extra comment. Before worrying about how to do this technically, let's first come up with animations. The tech solution can then follow our intent.

Do you think this is worth including into v1?

Depends on how we scope it out. When this issue was posted on Jan 6, the experience looked very different. Maybe this is already addressed?

I tried my hand in a little animation practice with #311. It doesn't work quite like i want it to however but still something to consider as inspiration for this

Thanks Ben!
Yea Christoph, I feel like this is a "nice to have" but not necessary.
@adamjonas do you feel like this issue has been addressed in the demo? If not, was there something more specific you had in mind to help define it a bit more?

Let me qualify this with that I'm a 4/10 on the strength of my conviction here. And so, while the challenge completion is certainly better, I don't think that the inline green text for that first challenge completion -- the magical moment of seeing satoshi's secret message revealed -- is the kind of endorphin hit that I was imagining. An animation or modal celebration would be more encouraging I believe.

Okay. This sounds like a "nice to have." I'm going to remove this from v1 and adding it to the backlog.
Ben, if you want I'm open to using the animations in your PR if @GBKS approves.
Moving forward let's have people leave a comment here on this issue with ideas or design proposal that design approves before submitting a PR.

Just to throw another idea on the table here for future reference, here's something we did at Casa that people seemed to really enjoy.
https://user-images.githubusercontent.com/32662508/225740639-6adbb0ba-236d-4051-95eb-8d7874cbe9c0.mov

Ah, the classic confetti.
Thanks for the PR exploration, @benalleng, great to see that it's easy to get Lottie animations in there. I don't find this specific animation hitting the spot. At this moment, the user is focused on the input field, pastes the code, and it turns green. The animated check is in the bottom-left corner, out of the focus-zone. It's also unexpected because usually nothing happens in UIs when pasting content. The effect would be much stronger and intuitive if the animation is right where the user is looking. Let's do some design exploration and discuss some variations that we can ideally also work across other challenge types.

Yeah, it's definitely not the best but it was free! I've been looking a little at Duolingo again and they have some fun modals to show the user's streak level. I'll try to find an example to paste here


Testing-76 :: Fix test build

Fixes https://github.com/RyanKoech/android-krypto/issues/76
Fix tests build. Add job for checking tests.
Failed test example: https://github.com/drahovac/android-krypto/pull/1/checks

Great job. For the two usecases test, they should me moved into the coin list feature since there is where the usecases exists.
Also for running the tests, why not use ./gradlew test? What is the difference?
Finally, for the commit messages, you can have them follow the format <issue type>-<issue number> :: <commit-message>. I'll update the contribution section.
After that I think everything should be good to merge

Sure we can go ahead with ./gradlew test and revert back to debug-only in case we need to.

Awesome. Thanks!


Contact form auto-responder sends auto response to admin address

I set up my contact form with an "admin" email address where the submitted forms go.  I also set up an auto-responder, assuming that it would send an auto response to the email specified in the contact form.  However when the form is submitted, there was only one email sent: to the "admin" address - containing both the autoresponce text and the content of the submitted fields.  There was no email sent to the email address entered in the form.
I'm using freshly downloaded 1.0.7 version.

I can confirm that with the fix the two emails are sent - to the site admin and to the user.  However the email to the user also contains the data that was sent to the admin right after the auto-response message - without even a line break.  I think the submitted data should not be included into the auto response message.
I believe the culprit is in line 294 of FormsManager.php:
$mail_autoresp = $mail_autoresp.$this->app->format->array_to_ul($pp_arr);

This line shouldn't be there.  Once I commented out this line, everything then works as I expected.

I submitted a pull request to address these issues.

thanks, added the fix to 1.0.8 branch

My pleasure


Deprecating FC UI Tests

As part of the redirect, we're eliminating many of the FC UI tests. We should work with QA to ensure we maintain proper test coverage in Terra.
AC:

There's a test plan and tickets are generated for any further actions.

Ambica has the lead on creating a test plan. She a team dedicated to triaging these tests and fixing them. We should assign a Terra point of contact to answer questions here, but I am not planning on dedicating significant development capacity to this effort. I'm closing this as a "invalid" as I don't think it's truly meant for this team's board.


api: move CSRA to a new group

We can't get a more natural directory structure for this new group using the generators as they are - but we do get the correct API paths, etc, so it seems like we should deal with the structure for now and fix it when or if upstream decides to support nested groups.

What this PR does / why we need it:
Which issue(s) this PR fixes (optional, use fixes #<issue_number>(, fixes #<issue_number>, ...) format, where issue_number might be a GitHub issue, or a Jira story:
Fixes #
Checklist

[ ] Subject and description added to both, commit and PR.
[ ] Relevant issues have been referenced.
[ ] This change includes docs.
[ ] This change includes unit tests.

/area hypershift-operator

/approve

/lgtm

/lgtm


Service dies when all recent apps are removed

Hello, first of all thank you very much for the package, it's great and will save us a lot of time. The problem I have encountered on a Xiaomi 11T with HyperOs and Android 14 (the only physical device I have tested so far) is that when deleting all recent applications using the 'X' button, the service dies and does not start again automatically. However, if we slide the application to remove it from recent this does not happen. I attach an illustrative image. The tests are done with the example package and all permissions have been accepted.

Thank you so much!!

@tdjag
I know that the "Close All Apps" button on Xiaomi devices has a different function compared to other manufacturers.
Generally, pressing the "Close All Apps" button does not forcefully terminate background or foreground services. However, in the case of Xiaomi devices, it has the characteristic of killing all processes.
From my past experience using a Xiaomi device, pressing the "Close All Apps" button would sometimes cause issues, such as Bluetooth pairing being disconnected or not receiving app notifications.
Currently, it seems that using the app list lock feature on Xiaomi devices and providing users with guidance on how to use it would be the best approach.

@Dev-hwang
Thanks for your reply, I will try to address it with this approach for Xiaomi. Any further input will be welcome.


Blockable WebView

Motivation
There isn't yet a fully reliable way to block, and handle, navigation to a specific url while using the WebViews. The current iOS method is at best (as mentioned here https://github.com/facebook/react-native/pull/6478 by @astreet) an unpredictable way of handling this. Android itself has no way of doing it at all.
Test Plan
A usage example was built in the UIExplorer WebView section. The controlled webview renders the react-native GitHub and blocks any navigations that would take the user to a non github.com urls or /login within github.com. It handles both blockage differently, showing a different component when the login url is identified or taking the users to the browser on the non github case.

I’m reviewing a similar PR at #10654. We’ll need to decide what direction this wants to go in, but I would suggest this looks a lot more flexible, and could incorporate the other PR (I think without additional work).

Yeah, this PR seems achieve the same thing as mine. I was inspired by the same issue (#6478).
The reason I didn't go for a regex-based solution though is because I was under the impression that there was a divergence in regex support between Java and Objective-C. I haven't looked into that in detail, so maybe someone else can comment on that? It would hinder consistency between platform though, and make the behaviour unpredictable.
Other than that it seems pretty similar, and I wouldn't mind closing my PR in favor of this if the regex bit is a non-issue.

I'm no regex expert, but from what I understand all patterns that work for JS should work for the other 2 languages. It seems that JS have less available patterns, but the ones that it does have should work seemingly on Java and Obj-C. So if the regex that is written is "JS friendly" it should work for Java and Obj-C. I have this code, using this library in production at the moment and the checks that we used, which I believe are the major people uses, are checking for some URL, checking for the absence of a word in a URL, checking protocols, and they all proved the same for all platforms.

Do you have any source that compares the regular expressions in JS, Android, and iOS? If you’re sure that any JS regular expression will be valid for Android and iOS, it might be worth it in dev mode to check that we can construct RegExps from the strings.

Nothing that neatly done. This statement of mine comes from the time I needed to find regex patterns, specially for the lookahead ones,  and saw them existing in iOS and Java, but not in JavaScript.

I did notice a few minor inconsistencies (\0 and \v). But these are unlikely to affect anything in real code. But if we go down this route, I still think we should check whether it is possible to construct valid JS RegExps and warn otherwise (a check in the render method should suffice).
Alternatively, could it be made simpler by not using RegExps and using simple wildcards instead (like those in Windows Explorer)? https://*, or *login*? It’s better for consistency, but I’m not sure about the flexibility for a user, and not sure if it’ll further complicate the code. Just a thought anyway.

The wildcards wouldn't work for some more complex use cases, where blacklisting and whitelisting can me mixed.

Could that be fixed by adding a mode or shouldMatch flag in each policy?

I did that in the first version, but I found that it gets much more complicated then a generic regex.

@jacobp100 should I fix the ci errors then so we can merge this, or we need further approval?

I can’t merge it myself, but it can’t be merged with CI errors (if they’re caused by this).

The initial source is never blocked, not in Android nor in iOS, actually. The main goal is to block navigations made from the webview, not the react code.

I'm not sure that's right @rseemann. For RN at least, it seems to be like shouldStartLoadWithRequest is called for every request on iOS, which blocks the initial source. While shouldOverrideUrlLoading on Android is only called for redirects, which would not block the initial source.

That is correct. What I meant is that the way the code was implemented was done in a way that neither iOS nor Android blocks the initial loading. That was done due to the fact that we understand that the setting of the source can be controlled from the react code already, while this policies would be used to block the navigation from the webview.

Hm, but testing with your example in WebViewExample.js, it does seem like the initial iOS source is blocked if you set it to anything other than github.com?

Is that so? I'll take a look at it then. It shouldn't.

@cbrevik what url are you testing? I tested facebook URL and what occur is that facebook navigates - via javascript - to another URL pretty much immediately after the page is loaded, so this is not the initial load. If a URL of a website that does not navigate forward is used, the page loads as expected. Do you have the same behaviour?

@rseemann For some reason when I tested earlier today it consistently blocked the URL when I went into the WebView-example. But I cannot seem to reproduce that behavior now. I am probably mistaken, sorry for the false alarm!

@jacobp100 I have no idea why the tests aren't passing. Can you give me a hand here?

When did you last merge master in?

about 4 hours ago

You could try pinging someone on the Facebook team to see if they know what’s up. Has it been failing in the same way for a few days now?

No, not the same way. Later today I'll rebase and let's see what happens.

@jacobp100 all done now. After the rebase the tests passed.

Not really, we'd have to include some default allowed schemes already,
otherwise this would affect everyone using webviews.
--
Rafael Seemann
about.me/rseemann
"Tempus edax rerum" - Smeagol
On Fri, Nov 11, 2016 at 12:49 PM, Christian Brevik<EMAIL_ADDRESS>
wrote:

@cbrevik commented on this pull request.
In ReactAndroid/src/main/java/com/facebook/react/views/
webview/ReactWebViewManager.java
https://github.com/facebook/react-native/pull/10772:

@@ -134,7 +135,55 @@ public void onPageStarted(WebView webView, String url, Bitmap favicon) {
public boolean shouldOverrideUrlLoading(WebView view, String url) {
if (url.startsWith("http://") || url.startsWith("https://") ||
url.startsWith("file://")) {

     return false;

         boolean shouldBlock = false;

Why? It's just about not making the check specific to certain URL schemes?
Since there's an open issue that can be fixed by this PR, I don't see the
point of not doing it.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/facebook/react-native/pull/10772, or mute the thread
https://github.com/notifications/unsubscribe-auth/AAQEtKtdVj5q8k2tne8QwIOZRUFMns8cks5q9FZKgaJpZM4Kqpsr
.

Yes, but couldn't that be like it always has been? For Android put
if (url.startsWith("http://") || url.startsWith("https://") || url.startsWith("file://") {
    return false;
}

Below your checking-code. If the URL doesn't hit the regex, then it will fall-through anyway and return false for http/https/file?

I haven't though about a way of doing this properly yet, specially for handling it equally on iOS and Android. Lemme take a better look at the code and will get back to you with the updated PR.

There you go, guys. I followed your advice, @cbrevik and added the policy checking before the default behaviour. I haven't fully tested with these changes though, but I'll test more in the upcoming days.

Very nice @rseemann! Looks good to me, I'll re-test later today.

@cbrevik did you have to opportunity to check if this implementation makes sense in your scenario?

@rseemann I'll look a bit more into this soon. Did an initial test and it looked fine, but I haven't tested in the app which I'm having problems with.

Hi, testing on iOS now I am unsure if I am writing my regex correctly.
Say for example I want to block customscheme://hello/2, if I try to use the following as policy:
[
  {
    url: '/customscheme:\/\//g',
  }
]

Then it does not work. That should be a valid regex shouldn't it?

It should work. Can you try without the /'s around?

I've tried that as well. Even with just 'customscheme'. Maybe I am doing something wrong again?

Not sure. I'll check it once I get home.

Just curious - why would you want to block people from navigating links? Is this good user experience when tapping a link does nothing?

I think there are use cases to stop external apps opening, or stop a user leaving a URL.

@cbrevik I think I found the problem. You need to add the .* to the end of the regex (customscheme:\/\/.*). As you mentioned, the regex is valid, but does not match the fully URL, does that make sense?

@rseemann Aha! It needs to match the whole URL, not just part of it.
Testing with customscheme:\/\/.* works on iOS! 👍
But testing with the same on Android, it doesn't seem to be calling the event callback?

@cbrevik for this case only, or any blocking made at Android?

It happens in any case. I've stepped through the code and the regex is matched - so that is not the problem.
It seems like the event for some reason is not dispatched. If you debug & break into dispatch for TopNavigationBlockedEvent, then you see rctEventEmitter is null. I'm not familiar enough with the RN event logic to know if that is normal though. It seems like that is the case for the other events as well (TopLoadingStart, Finish, etc).

@cbrevik I guess that during the refactoring I might have removed the passing of the onNavigationBlocked props to the native component. It should work now. Thanks once again for the help

What do you guys think, are we good to go?

Is it ready to be merged? If so, could you give a summary what has changed since from the description in the PR?

I believe it is ready.
So the main change was that now the blocking rules can be applied to non-http and https requests, which allows a better navigation control and usage with custom url schemas.

@jacobp100 do you think we're moving forward with this? Are we missing something?

I’m not able to merge pull requests. Try cc’ing one of the FB team.

This message was created automatically by mail delivery software.
A message that you sent could not be delivered to one or more of its
recipients. This is a temporary error. The following address(es) deferred:
<EMAIL_ADDRESS>Domain thumbmunkeys.com has exceeded the max emails per hour (72/60 (120%)) allowed.  Message will be reattempted later
------- This is a copy of the message, including all the headers. ------
Received: from filter03.reliabledns.org ([<IP_ADDRESS>]:35504)
by en02-ams.stablehost.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256)
(Exim 4.87)
(envelope-from<EMAIL_ADDRESS>id 1cHc93-0008zy-12
for<EMAIL_ADDRESS>Thu, 15 Dec 2016 19:56:51 +0000
Received: from github-smtp2-ext3.iad.github.net ([<IP_ADDRESS>] helo=github-smtp2b-ext-cp1-prd.iad.github.net)
by filter03.reliabledns.org with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256)
(Exim 4.86)
(envelope-from<EMAIL_ADDRESS>id 1cHc92-0001Gy-2Y
for<EMAIL_ADDRESS>Thu, 15 Dec 2016 12:56:49 -0700
Date: Thu, 15 Dec 2016 11:56:47 -0800
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=github.com;
s=pf2014; t=1481831807;
bh=wkGVfSFoQ+rAVoOsVks1TeR8g9x7h+fCECNrlwodW7E=;
h=From:Reply-To:To:Cc:In-Reply-To:References:Subject:List-ID:
List-Archive:List-Post:List-Unsubscribe:From;
b=inW2fiAwMMhH9keva1/ongWUoOoGSpgH/KojlmbHKir8CFyeoGWpda0xNPCMTCW6z
JAc9X3MG4AzpRedQcy/aO2MnRA2zjWbC5RZ7tS2n8eootG1OT6uXhcxgupzf/U/m87
guzCaL4ZwWZ4W8flOlrRjyUJqjpOxIsSzm1BGxUU=
From: Martin Konicek<EMAIL_ADDRESS>Reply-To: facebook/react-native<EMAIL_ADDRESS>To: facebook/react-native<EMAIL_ADDRESS>Cc: Subscribed<EMAIL_ADDRESS>Message-ID<EMAIL_ADDRESS>In-Reply-To<EMAIL_ADDRESS>References<EMAIL_ADDRESS>Subject: Re: [facebook/react-native] Blockable WebView (#10772)
Mime-Version: 1.0
Content-Type: multipart/alternative;
boundary="--==_mimepart_5852f57f32688_2d253fc47da711341741f3";
charset=UTF-8
Content-Transfer-Encoding: 7bit
Precedence: list
X-GitHub-Sender: mkonicek
X-GitHub-Recipient: bunnyboy1
X-GitHub-Reason: subscribed
List-ID: facebook/react-native <react-native.facebook.github.com>
List-Archive: https://github.com/facebook/react-native
List-Post<EMAIL_ADDRESS>List-Unsubscribe<EMAIL_ADDRESS>https://github.com/notifications/unsubscribe/ARoNg0UzyhuUZsQDdKxBGY7bP5No9SM1ks5rIZt_gaJpZM4Kqpsr
X-Auto-Response-Suppress: All
X-GitHub-Recipient-Address<EMAIL_ADDRESS>Received-SPF: pass (filter03.reliabledns.org: domain of github.com designates <IP_ADDRESS> as permitted sender) client-ip=<IP_ADDRESS><EMAIL_ADDRESS>helo=github-smtp2b-ext-cp1-prd.iad.github.net;
X-SPF-Result: filter03.reliabledns.org: domain of github.com designates <IP_ADDRESS> as permitted sender
Authentication-Results: filter03.reliabledns.org; dmarc=pass header.from=github.com
X-Filter-ID: s0sct1PQhAABKnZB5plbIamwIYzgudGL4tMY9zS3pea7KY6rzXjgC+rgKYUjsj8D0JuF70A4EJMc
Wn6O/bsgoWSYW6KbZfj8apx6ohl75uUU/+/bMkPgJ5dk+Qj/Ds3FlNsjl/D0CRowqxU8xqCxBoIf
AusLrPYiqQ5mfm+IvLi0ni+vukgSibitVtxew+gw4CoPoPhaQllmvZjlFt10GaVkPzVC8jNjkDwf
+ib4NAIsY5DByfq1U5Mroznf6PAvUae6+tl7lCq5dTwwSy4Vqpz3A1ed2ITkOuMtrwds5D4lTQ4T
s4pbWtZ3YR/lXG1VJq/4FZbX1lzD9O+fyiIjB8wTNR/tjjZvmBdM/4lPZO2sASVdHfbtk3LlI8pB
wr4jGeKz8vlEl/GSEiCnxc6Ard0BaVp3jhK5GOBJIv+LCtDC+P7wO5Dn5esh4VR+ptzHN0JkcMmQ
sV7j9toT40ga/BqOpbstZb+O7wPE59JQ50/mihMhLJ08fl4IxNFCDhk/M2Pa7DNq6GdC+PlD6FUL
eh5hjsTbVRmo7nFMDV0g9AuSw65FNOBzbhOHsMsHCJitY4oALJxlt+EUmAYCHaGiZfG0+kalGE1+
o9UxnI9bW8IamUdylUIKhf3z2GAHxH7IKsUKxujViXQg1j7qnxK2IHojPNVbi4DAJkV6LcrepsU=
X-Report-Abuse-To<EMAIL_ADDRESS>Authentication-Results: reliabledns.org; spf=pass<EMAIL_ADDRESS>Authentication-Results: reliabledns.org; dkim=pass header.i=github.com
X-SpamExperts-Class: ham
X-SpamExperts-Evidence: dnswl/se-reputation (trusted ham)
X-Classification: not-spam/dnswl
X-Recommended-Action: accept
X-Spam-Status: No, score=0.9
X-Spam-Score: 9
X-Spam-Bar: /
X-Ham-Report: Spam detection software, running on the system "en02-ams.stablehost.com",
has NOT identified this incoming email as spam.  The original
message has been attached to this so you can view it or label
similar future email.  If you have any questions, see
root@localhost for details.
Content preview:  mkonicek commented on this pull request. > + showCustomLogin
? + this.customLoginRender() : + <WebView style={{ + backgroundColor: BGWASH,
+ height: 200, + }} + source={source} + navigationBlockingPolicies={policies}
+ onNavigationBlocked={this.onNavigationBlocked} + /> + } +  + );

} + + customLoginRender() { [...]

Content analysis details:   (0.9 points, 5.0 required)
pts rule name              description

-0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at http://www.dnswl.org/, no
trust
[<IP_ADDRESS> listed in list.dnswl.org]
1.5 SPF_SOFTFAIL           SPF: sender does not match SPF record (softfail)
1.4 HTML_IMAGE_ONLY_28     BODY: HTML: images with 2400-2800 bytes of words
0.0 HTML_MESSAGE           BODY: HTML included in message
-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
[score: 0.0016]
-0.1 DKIM_VALID_AU          Message has a valid DKIM or DK signature from author's
domain
0.1 DKIM_SIGNED            Message has a DKIM or DK signature, not necessarily valid
-0.1 DKIM_VALID             Message has at least one valid DKIM or DK signature
X-Spam-Flag: NO
----==_mimepart_5852f57f32688_2d253fc47da711341741f3
Content-Type: text/plain;
charset=UTF-8
Content-Transfer-Encoding: 7bit
mkonicek commented on this pull request.

     showCustomLogin ?

     this.customLoginRender() :

     <WebView style={{

       backgroundColor: BGWASH,

       height: 200,

     }}

       source={source}

       navigationBlockingPolicies={policies}

       onNavigationBlocked={this.onNavigationBlocked}

     />

   }

 </View>

);
}

customLoginRender() {

This should be called renderCustomLogin, or ideally should be a small component.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/facebook/react-native/pull/10772#pullrequestreview-13207888
----==_mimepart_5852f57f32688_2d253fc47da711341741f3
Content-Type: text/html;
charset=UTF-8
Content-Transfer-Encoding: 7bit
@mkonicek commented on this pull request.

In Examples/UIExplorer/js/WebViewExample.js:
> +          showCustomLogin ?
+          this.customLoginRender() :
+          <WebView style={{
+            backgroundColor: BGWASH,
+            height: 200,
+          }}
+            source={source}
+            navigationBlockingPolicies={policies}
+            onNavigationBlocked={this.onNavigationBlocked}
+          />
+        }
+      </View>
+    );
+  }
+
+  customLoginRender() {

This should be called renderCustomLogin, or ideally should be a small component.
—You are receiving this because you are subscribed to this thread.Reply to this email directly, view it on GitHub, or mute the thread.

----==_mimepart_5852f57f32688_2d253fc47da711341741f3--

This message was created automatically by mail delivery software.
A message that you sent could not be delivered to one or more of its
recipients. This is a temporary error. The following address(es) deferred:
<EMAIL_ADDRESS>Domain thumbmunkeys.com has exceeded the max emails per hour (73/60 (121%)) allowed.  Message will be reattempted later
------- This is a copy of the message, including all the headers. ------
Received: from filter03.reliabledns.org ([<IP_ADDRESS>]:35520)
by en02-ams.stablehost.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256)
(Exim 4.87)
(envelope-from<EMAIL_ADDRESS>id 1cHc9a-0009NG-Ma
for<EMAIL_ADDRESS>Thu, 15 Dec 2016 19:57:23 +0000
Received: from github-smtp2-ext6.iad.github.net ([<IP_ADDRESS>] helo=github-smtp2b-ext-cp1-prd.iad.github.net)
by filter03.reliabledns.org with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256)
(Exim 4.86)
(envelope-from<EMAIL_ADDRESS>id 1cHc9a-0001Ix-28
for<EMAIL_ADDRESS>Thu, 15 Dec 2016 12:57:22 -0700
Date: Thu, 15 Dec 2016 11:57:18 -0800
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=github.com;
s=pf2014; t=1481831841;
bh=c/iR2HyYSvQk190PozvusgZcXUF5h8qm78djVNaLkLM=;
h=From:Reply-To:To:Cc:In-Reply-To:References:Subject:List-ID:
List-Archive:List-Post:List-Unsubscribe:From;
b=mJwnmpiTgJZwKYyQbnQxp0SX46piQ26P+gRlmedDq4w6AqCmb81TcOIrSO+Q3tMGl
ranurr2qiWqE8UAJVLpTmimiK/m3a/UCIxWf0zsY6wUxGe/dRBj/2lwxKaeGdMMuUj
oZSBAjSPDzTvQfQesFEBKtovZM+8Rm420hrmoGtg=
From: Martin Konicek<EMAIL_ADDRESS>Reply-To: facebook/react-native<EMAIL_ADDRESS>To: facebook/react-native<EMAIL_ADDRESS>Cc: Subscribed<EMAIL_ADDRESS>Message-ID<EMAIL_ADDRESS>In-Reply-To<EMAIL_ADDRESS>References<EMAIL_ADDRESS>Subject: Re: [facebook/react-native] Blockable WebView (#10772)
Mime-Version: 1.0
Content-Type: multipart/alternative;
boundary="--==_mimepart_5852f59e991f0_264023fec1b4e91382416f2";
charset=UTF-8
Content-Transfer-Encoding: 7bit
Precedence: list
X-GitHub-Sender: mkonicek
X-GitHub-Recipient: bunnyboy1
X-GitHub-Reason: subscribed
List-ID: facebook/react-native <react-native.facebook.github.com>
List-Archive: https://github.com/facebook/react-native
List-Post<EMAIL_ADDRESS>List-Unsubscribe<EMAIL_ADDRESS>https://github.com/notifications/unsubscribe/ARoNg6s1OgJ_T-LjK0tHotBn80VwYo5bks5rIZuegaJpZM4Kqpsr
X-Auto-Response-Suppress: All
X-GitHub-Recipient-Address<EMAIL_ADDRESS>Received-SPF: pass (filter03.reliabledns.org: domain of github.com designates <IP_ADDRESS> as permitted sender) client-ip=<IP_ADDRESS><EMAIL_ADDRESS>helo=github-smtp2b-ext-cp1-prd.iad.github.net;
X-SPF-Result: filter03.reliabledns.org: domain of github.com designates <IP_ADDRESS> as permitted sender
Authentication-Results: filter03.reliabledns.org; dmarc=pass header.from=github.com
X-Filter-ID: s0sct1PQhAABKnZB5plbIamwIYzgudGL4tMY9zS3pea7KY6rzXjgC+rgKYUjsj8D0JuF70A4EJMc
Wn6O/bsgoWSYW6KbZfj8apx6ohl75uUU/+/bMkPgJ5dk+Qj/Ds3FlNsjl/D0CRowqxU8xqCxBoIf
AusLrPYiqQ5mfm+IvLi0ni+vukgSibitVtxew+gwn8J7rDrVVBRYmTtN+BLWbKVkPzVC8jNjkDwf
+ib4NAKyupAWhcuQBH+7nHT64EIzLtOygCUnURzK8URFRndfBJz3A1ed2ITkOuMtrwds5D7ntYOF
6AzPWW/5/YEVbpjkJq/4FZbX1lzD9O+fyiIjB8wTNR/tjjZvmBdM/4lPZO2sASVdHfbtk3LlI8pB
wr4jGeKz8vlEl/GSEiCnxc6Ard0BaVp3jhK5GOBJIv+LCtDC+P7wO5Dn5esh4VR+ptzHN0JkcMmQ
sV7j9toT40ga/BqOpbstZb+O7wPE59JQ50/mihMhLJ08fl4IxNFCDhk/M2Pa7DNq6GdC+PlD6FUL
eh5hjsTbVRmo7nFMDV0g9AuSw65FNOBzbhOHsMsHCJitY4oALJxlt+EUmAYCHaGiZfG0+kalGE1+
o9UxnI9bW8IamUdylUIKhf3z2GAHxH7IKsUKxujViXQg1j7qnxK2IHojPNVbi4DAJkV6LcrepsU=
X-Report-Abuse-To<EMAIL_ADDRESS>Authentication-Results: reliabledns.org; spf=pass<EMAIL_ADDRESS>Authentication-Results: reliabledns.org; dkim=pass header.i=github.com
X-SpamExperts-Class: ham
X-SpamExperts-Evidence: dnswl/se-reputation (trusted ham)
X-Classification: not-spam/dnswl
X-Recommended-Action: accept
X-Spam-Status: No, score=0.9
X-Spam-Score: 9
X-Spam-Bar: /
X-Ham-Report: Spam detection software, running on the system "en02-ams.stablehost.com",
has NOT identified this incoming email as spam.  The original
message has been attached to this so you can view it or label
similar future email.  If you have any questions, see
root@localhost for details.
Content preview:  mkonicek commented on this pull request. > @@ -160,6 +160,20
@@ class WebView extends React.Component { * @platform android / allowUniversalAccessFromFileURLs:
PropTypes.bool, + + /* + * Rules that will be used to block the webview
navigation + */ + navigationBlockingPolicies: PropTypes.arrayOf(PropTypes.shape({
+ currentURL: PropTypes.string, + url: PropTypes.string, [...]
Content analysis details:   (0.9 points, 5.0 required)
pts rule name              description

-0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at http://www.dnswl.org/, no
trust
[<IP_ADDRESS> listed in list.dnswl.org]
1.5 SPF_SOFTFAIL           SPF: sender does not match SPF record (softfail)
1.4 HTML_IMAGE_ONLY_28     BODY: HTML: images with 2400-2800 bytes of words
0.0 HTML_MESSAGE           BODY: HTML included in message
-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
[score: 0.0000]
-0.1 DKIM_VALID_AU          Message has a valid DKIM or DK signature from author's
domain
0.1 DKIM_SIGNED            Message has a DKIM or DK signature, not necessarily valid
-0.1 DKIM_VALID             Message has at least one valid DKIM or DK signature
X-Spam-Flag: NO
----==_mimepart_5852f59e991f0_264023fec1b4e91382416f2
Content-Type: text/plain;
charset=UTF-8
Content-Transfer-Encoding: 7bit
mkonicek commented on this pull request.

@@ -160,6 +160,20 @@ class WebView extends React.Component {
* @platform android
*/
allowUniversalAccessFromFileURLs: PropTypes.bool,

/**

* Rules that will be used to block the webview navigation

*/

navigationBlockingPolicies: PropTypes.arrayOf(PropTypes.shape({

 currentURL: PropTypes.string,

 url: PropTypes.string,

Add docs. What is currentURL. What is url?
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/facebook/react-native/pull/10772#pullrequestreview-13207999
----==_mimepart_5852f59e991f0_264023fec1b4e91382416f2
Content-Type: text/html;
charset=UTF-8
Content-Transfer-Encoding: 7bit
@mkonicek commented on this pull request.

In Libraries/Components/WebView/WebView.android.js:
> @@ -160,6 +160,20 @@ class WebView extends React.Component {
      * @platform android
      */
     allowUniversalAccessFromFileURLs: PropTypes.bool,
+
+    /**
+     * Rules that will be used to block the webview navigation
+     */
+    navigationBlockingPolicies: PropTypes.arrayOf(PropTypes.shape({
+      currentURL: PropTypes.string,
+      url: PropTypes.string,

Add docs. What is currentURL. What is url?
—You are receiving this because you are subscribed to this thread.Reply to this email directly, view it on GitHub, or mute the thread.

----==_mimepart_5852f59e991f0_264023fec1b4e91382416f2--

This message was created automatically by mail delivery software.
A message that you sent could not be delivered to one or more of its
recipients. This is a temporary error. The following address(es) deferred:
<EMAIL_ADDRESS>Domain thumbmunkeys.com has exceeded the max emails per hour (74/60 (123%)) allowed.  Message will be reattempted later
------- This is a copy of the message, including all the headers. ------
Received: from filter01.reliabledns.org ([<IP_ADDRESS>]:53279)
by en02-ams.stablehost.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256)
(Exim 4.87)
(envelope-from<EMAIL_ADDRESS>id 1cHcAI-0009p7-Ek
for<EMAIL_ADDRESS>Thu, 15 Dec 2016 19:58:08 +0000
Received: from github-smtp2-ext2.iad.github.net ([<IP_ADDRESS>] helo=github-smtp2b-ext-cp1-prd.iad.github.net)
by filter01.reliabledns.org with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256)
(Exim 4.86)
(envelope-from<EMAIL_ADDRESS>id 1cHcAG-0008Io-V6
for<EMAIL_ADDRESS>Thu, 15 Dec 2016 12:58:06 -0700
Date: Thu, 15 Dec 2016 11:58:03 -0800
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=github.com;
s=pf2014; t=1481831883;
bh=rb7cPwS55mx6767MR7yfXOu+pmlJPiUDcjKN8gW0pss=;
h=From:Reply-To:To:Cc:In-Reply-To:References:Subject:List-ID:
List-Archive:List-Post:List-Unsubscribe:From;
b=vZO4f6tcwsn5azQPhRKgZepHkFSnlh5dUTZG/XhnuFFhrnqy6rgmMEd3W51rClixQ
KMjs4jDmQqcEu1e9FilKviQSRB+kggFMx0fVoL2R0Xibjo6xiWLk6HDsD1wtT67Iqv
h9+x9FDpDx/a6PHKiakIX1U4nkwUQ1w5Z2kItmHU=
From: Martin Konicek<EMAIL_ADDRESS>Reply-To: facebook/react-native<EMAIL_ADDRESS>To: facebook/react-native<EMAIL_ADDRESS>Cc: bunnyboy1<EMAIL_ADDRESS>Comment<EMAIL_ADDRESS>Message-ID<EMAIL_ADDRESS>In-Reply-To<EMAIL_ADDRESS>References<EMAIL_ADDRESS>Subject: Re: [facebook/react-native] Blockable WebView (#10772)
Mime-Version: 1.0
Content-Type: multipart/alternative;
boundary="--==_mimepart_5852f5cbebfae_267a33fec1b4e91382596a";
charset=UTF-8
Content-Transfer-Encoding: 7bit
Precedence: list
X-GitHub-Sender: mkonicek
X-GitHub-Recipient: bunnyboy1
X-GitHub-Reason: comment
List-ID: facebook/react-native <react-native.facebook.github.com>
List-Archive: https://github.com/facebook/react-native
List-Post<EMAIL_ADDRESS>List-Unsubscribe<EMAIL_ADDRESS>https://github.com/notifications/unsubscribe/ARoNg2VYWOeFlRDrQGowsD1psyikiFXsks5rIZvLgaJpZM4Kqpsr
X-Auto-Response-Suppress: All
X-GitHub-Recipient-Address<EMAIL_ADDRESS>Received-SPF: pass (filter01.reliabledns.org: domain of github.com designates <IP_ADDRESS> as permitted sender) client-ip=<IP_ADDRESS><EMAIL_ADDRESS>helo=github-smtp2b-ext-cp1-prd.iad.github.net;
X-SPF-Result: filter01.reliabledns.org: domain of github.com designates <IP_ADDRESS> as permitted sender
Authentication-Results: filter01.reliabledns.org; dmarc=pass header.from=github.com
X-Filter-ID: s0sct1PQhAABKnZB5plbIamwIYzgudGL4tMY9zS3pea7KY6rzXjgC+rgKYUjsj8D0JuF70A4EJMc
Wn6O/bsgoWSYW6KbZfj8apx6ohl75uUU/+/bMkPgJ5dk+Qj/Ds3FlNsjl/D0CRowqxU8xqCxBoIf
AusLrPYiqQ5mfm+IvLi0ni+vukgSibitVtxew+gw0B571p0AhdwQHCzyyBzG86VkPzVC8jNjkDwf
+ib4NAKCKeDK7QXt95dVDVqErDTpCmhmHpny+XjAgb1uee3P1Jz3A1ed2ITkOuMtrwds5D6QdT8q
EsTOViQWgUysSA9kJq/4FZbX1lzD9O+fyiIjB8wTNR/tjjZvmBdM/4lPZO2sASVdHfbtk3LlI8pB
wr4jGeKz8vlEl/GSEiCnxc6Ard0BaVp3jhK5GOBJIv+LCtDC+P7wO5Dn5esh4VR+ptzHN0JkcMmQ
sV7j9toT40ga/BqOpbstZb+O7wPE59JQ50/mihMhLJ08fl4IxNFCDhk/M2Pa7DNq6GdC+PlD6FUL
eh5hjsTbVRmo7nFMDV0g9AuSw65FNOBzbhOHsMsHCJitnRX4bob8BvefLIQAPNSOdPG0+kalGE1+
o9UxnI9bW8IamUdylUIKhf3z2GAHxH7In/S0lUS7o5wiHEkvDt5axSEgHpnfjN1+qTsv4FA5NlU=
X-Report-Abuse-To<EMAIL_ADDRESS>Authentication-Results: reliabledns.org; spf=pass<EMAIL_ADDRESS>Authentication-Results: reliabledns.org; dkim=pass header.i=github.com
X-SpamExperts-Class: ham
X-SpamExperts-Evidence: dnswl/se-reputation (trusted ham)
X-Classification: not-spam/dnswl
X-Recommended-Action: accept
X-Spam-Status: No, score=1.6
X-Spam-Score: 16
X-Spam-Bar: +
X-Ham-Report: Spam detection software, running on the system "en02-ams.stablehost.com",
has NOT identified this incoming email as spam.  The original
message has been attached to this so you can view it or label
similar future email.  If you have any questions, see
root@localhost for details.
Content preview:  mkonicek commented on this pull request. > @@ -333,6 +349,11
@@ class WebView extends React.Component { var {onMessage} = this.props;
onMessage && onMessage(event); } + + onNavigationBlocked = (event) => { +
var {onNavigationBlocked} = this.props; [...]
Content analysis details:   (1.6 points, 5.0 required)
pts rule name              description

-0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at http://www.dnswl.org/, no
trust
[<IP_ADDRESS> listed in list.dnswl.org]
0.5 RCVD_IN_SORBS_SPAM     RBL: SORBS: sender is a spam source
[<IP_ADDRESS> listed in dnsbl.sorbs.net]
1.5 SPF_SOFTFAIL           SPF: sender does not match SPF record (softfail)
1.6 HTML_IMAGE_ONLY_24     BODY: HTML: images with 2000-2400 bytes of words
0.0 HTML_MESSAGE           BODY: HTML included in message
-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
[score: 0.0000]
-0.1 DKIM_VALID_AU          Message has a valid DKIM or DK signature from author's
domain
0.1 DKIM_SIGNED            Message has a DKIM or DK signature, not necessarily valid
-0.1 DKIM_VALID             Message has at least one valid DKIM or DK signature
X-Spam-Flag: NO
----==_mimepart_5852f5cbebfae_267a33fec1b4e91382596a
Content-Type: text/plain;
charset=UTF-8
Content-Transfer-Encoding: 7bit
mkonicek commented on this pull request.

@@ -333,6 +349,11 @@ class WebView extends React.Component {
var {onMessage} = this.props;
onMessage && onMessage(event);
}

onNavigationBlocked = (event) => {
var {onNavigationBlocked} = this.props;

Use const
--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
https://github.com/facebook/react-native/pull/10772#pullrequestreview-13208156
----==_mimepart_5852f5cbebfae_267a33fec1b4e91382596a
Content-Type: text/html;
charset=UTF-8
Content-Transfer-Encoding: 7bit
@mkonicek commented on this pull request.

In Libraries/Components/WebView/WebView.android.js:
> @@ -333,6 +349,11 @@ class WebView extends React.Component {
     var {onMessage} = this.props;
     onMessage && onMessage(event);
   }
+
+  onNavigationBlocked = (event) => {
+    var {onNavigationBlocked} = this.props;

Use const
—You are receiving this because you commented.Reply to this email directly, view it on GitHub, or mute the thread.

----==_mimepart_5852f5cbebfae_267a33fec1b4e91382596a--

Sorry about the delay. Understand the intention now. The code needs quite a lot of changes.

@rseemann Do you need any help with this PR? I've found more use cases for it on my end (in different projects), so I'd love to have this merged before the next January release.

Any progress? Seems like this PR needs some changes before it can be reviewed again.

I'll work on this very soon, but any help is appreciated :)

Any news on this PR ? :)

This PR appears to be abandoned. Closing for now.


Fix gisaid image

Summary:

What: I pushed a change that broke the build of the gisaid image. This fixes the image and adds some very basic sanity checking to our batch images
Ticket: sc<fill_in_issue_number>
Env: <rdev link>

Demos:
Notes:
Checklist:

[x] I merged latest <base branch>
[x] I manually verified the change
[ ] I added labels to my PR
[ ] I tested in multiple browsers
[x] I added relevant unit tests
[ ] I have notified others of changes they need to make locally (migrations, jobs, package updates, etc)

The Click error in pytest is really weird, it's raising an error on an exit code of 0? Otherwise lgtm.


Standardize PowerShell SemVer Parsing Logic

Adapt logic from the following usages of SemVer and create a common class that can be then used by them.

https://github.com/Azure/azure-sdk/blob/master/eng/scripts/Update-Release-Versions.ps1#L26-L58
https://github.com/Azure/azure-sdk-for-net/blob/master/eng/Update-PkgVersion.ps1#L48
https://github.com/Azure/azure-sdk-for-cpp/blob/master/eng/Update-PkgVersion.ps1#L48

Part of #469

Shows this being used - https://github.com/Azure/azure-sdk-for-cpp/pull/59

LGTM thanks for starting this. It is probably going to be worth adding other helper validation methods and sorting methods to this class as well but we can do that as needed.

FYI @scbedd as we move the doc versioning stuff to the open we should try to share this code.


Add stop and regenerate buttons

It would be a good idea to add a button for regenerate and stop the current generation.

I suggest changing the send button to stop during generation to save space on screen and keep the interface simple.

good Idea. If I have time tomorrow evening, I'll do it.


if a prefix is specified without a "/" in composer, it does not start

as titled

Can you post me a config example to reproduce the issue?

generate a new one with create-platformatic and remove the slash from the prefix.

Also if openapi.url does not start with a slash, it raises a Invalid URL error


Also collapse graph

I like this idea 👍 Can you update the toggle toolbars button tooltip to make it obvious that the the graph/map area is going to be collapsed too? Maybe "(un)hide toolbars and visualizations"? @awick thoughts?
Also, I marked this PR and issue with the HackTogether label. If you want swag, please sign-up for Yahoo! Hack Together, if you have not done so, yet.


Sanitization for click inputs

I would like to see some method of easy sanitation after an input. I guess I could define a type and require that type for the input but that seems a little extravagant if I want to make sure that say a field entered is a valid email address during input or to strip out spaces automatically. I know I can do this in the code but it should be possible inside prompt.

Can you not use our callback system for this?

Oh I see. We might only invoke the type conversion but not the callbacks for prompts currently.  I wonder if that can be changed though.

It would be a good feature indeed.

Yeah in the code I wrote I ended up just calling strip to sanitize it somewhat and prevent spaces at the beginning and the end but that does not actually validate the data. It does fix the issue I had of people using copy and paste and grabbing a space but not the underlying problem of allowing a complete input sanitization check.

Parameter.callback is already called for the result of prompt (or any other parameter source), but it's called after prompt returns, not inside it. So while it's possible to perform extra processing, if that processing raises a click.UsageError it exits instead of prompting again.
I'm not sure if this was always the case or if it was due to recent refactors to the type processing pipeline. I think we can extend that refactoring a bit further though to address this issue. prompt is passed self.process_value, which only does type conversion. However, handle_parse_result calls full_process_value (which calls process_value) then applies the callback separately. There's no reason to have that separate anymore, and along with that there's no reason to have both process_value and full_process_value.

Inline Parameter.process_value into Parameter.full_process_value, then rename full_process_value to process_value.
Move the if self.callback: block from Parameter.handle_parse_result to the bottom of process_value.
prompt is still passed self.process_value, but now that method is doing other checks as well as invoking the callback. All the checks raise UsageError, so they should still be handled correctly by prompt.

I'd like to work on this.