[webview_flutter] stopped working: blank screen

All of a sudden webview_flutter seems to have stopped functioning properly, and is showing a blank screen.
Output of flutter doctor -v:
[✓] Flutter (Channel stable, v1.9.1+hotfix.4, on Mac OS X 10.14.6 18G87, locale en-NL)
    • Flutter version 1.9.1+hotfix.4 at /Users/sammy/Flutter/flutter
    • Framework revision cc949a8e8b (12 days ago), 2019-09-27 15:04:59 -0700
    • Engine revision b863200c37
    • Dart version 2.5.0

[!] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at /Users/sammy/Library/Android/sdk
    • Android NDK at /Users/sammy/Library/Android/sdk/ndk-bundle
    • Platform android-28, build-tools 28.0.3
    • ANDROID_HOME = /Users/sammy/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
    ! Some Android licenses not accepted.  To resolve this, run: flutter doctor --android-licenses

[✓] Xcode - develop for iOS and macOS (Xcode 11.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.1, Build version 11A1027
    • CocoaPods version 1.7.5

[✓] Android Studio (version 3.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 34.0.1
    • Dart plugin version 182.5215
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)

[✓] Connected device (1 available)
    • iPhone 11 Pro Max • 8F42114A-B0C7-445E-B4C1-80FE37171206 • ios • com.apple.CoreSimulator.SimRuntime.iOS-13-1 (simulator)

! Doctor found issues in 1 category.

I've got in info.plist:
	<key>io.flutter.embedded_views_preview</key>
	<string>YES</string>

@SammyO will it help if you use
<key>io.flutter.embedded_views_preview</key>
<true/>

?

@BondarenkoStas tried that out just now, doesn't help unfortunately.
My pubspec.yaml:
environment:
  sdk: ">=2.1.0 <3.0.0"

dependencies:
  flutter:
    sdk: flutter
  sqflite:
  path_provider:
  flutter_html: ^0.10.4
  webview_flutter: 0.3.11+3
  flutter_markdown: "^0.2.0"
  firebase_storage:
  cloud_firestore: 0.12.9
  firebase_core: ^0.4.0
  firebase_auth: ^0.13.0
  photo_view: 0.4.2
  connectivity: ^0.4.2

  # Error reporting
  #sentry: 2.2.
  sentry:
    path: ./custom_sentry_client/
  catcher:
    path: ./custom_catcher
  device_info: 0.4.0+2
  package_info: 0.4.0+6

  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^0.1.2

dev_dependencies:
  flutter_test:
    sdk: flutter

I'm trying to figure out what could have caused this. I updated my Flutter install, but I can't figure out how I can determine with which Flutter version previous builds were created (builds up until yesterday's update worked fine), in order to compare them to this build. Furthermore I ran pod install and pod update a few times, which may have broken things. I've reverted to a previous commit though, and redid pod install and pod update, but the build still isn't working.
Please let me know if I can provide any more information or test things. Thanks.

@SammyO Are there any error logs when you run it with --verbose flag?

No... Could it be related to https://github.com/flutter/flutter/issues/39470? I have been working on trying to fix this error using suggestions provided in the link, after which the build started breaking.

I've created a small project in which the issue is reproduced https://github.com/SammyO/broken_webview_flutter

@BondarenkoStas please let me know if I can help in any way. I'd be happy to try to fix this, but I don't know where to start with debugging this, as there are no logs or errors indicating anything is going wrong.

Sorry @SammyO, I'm just doing initial triage here, and don't think that I'm able to help. Let's wait for somebody else from the team to pick the issue.

I see. Thanks for the quick reply!

Some more information.

Produces blank screen in iOS

  Widget _getWebView(BuildContext context, String rawText) {
    return WebView(
      initialUrl: new Uri.dataFromString(rawText, mimeType: 'text/html', encoding: Encoding.getByName("UTF-8")).toString(),
    );
  }

Produces blank screen in iOS

  Widget _getWebView(BuildContext context, String rawText) {
    return WebView(
      initialUrl: "www.google.com",
    );
  }

Produces valid Google website

  Widget _getWebView(BuildContext context, String rawText) {
    return WebView(
      initialUrl: "https://www.google.com",
    );
  }

I can furthermore confirm that
  Widget _getWebView(BuildContext context, String rawHtml) {
    return WebView(
      initialUrl: '',
      onWebViewCreated: (WebViewController webViewController) {
        _controller = webViewController;
        _setRawHtml(rawHtml);
      },
      navigationDelegate: (NavigationRequest request) {
        return _processHref(context, request.url);
      }
    );
  }

  _setRawHtml(String rawHtml) async {
    _controller.loadUrl(Uri.dataFromString(
        rawHtml,
        mimeType: 'text/html',
        encoding: Encoding.getByName('utf-8')
    ).toString());
  }
``
seems to work.

Hi @SammyO !
Did you try these solutions?
https://stackoverflow.com/questions/30731785/how-do-i-load-an-http-url-with-app-transport-security-enabled-in-ios-9
https://github.com/flutter/flutter/issues/25351#issuecomment-526617475
Maybe solve because your URL is not a valid https.

@deandreamatias I tried that too, didn't work either unfortunately.

I have exactly the same problem, when trying to create webview with data from string. But I've found that when I run app with verbose param there is such log line:

[  +10 ms] [DEVICE LOG] 2019-12-13 13:46:37.308463+0100  localhost Runner[4051]: (UIKitCore) -canOpenURL: failed for URL: "data:text/html;charset=utf-8,%3Chtml%3E%3Chead%3E%3C/head%3E%3Cbody%20onload=%22 ... /html%3E" - error: "This app is not allowed to query for scheme data"

It looks like it is iOs problem with opening "data:XXX" schemes.  On Android it works fine.

Hi @SammyO, can you please confirm if you still experience this issue on latest dev channel (1.20.0-0.0.pre) and with latest version of webview_flutter plugin ?
According to your comment here (https://github.com/flutter/flutter/issues/42351#issuecomment-541813185), I tried to replicate this issue on iOS simulator (13.3), but didn't see issue for # 1, as you described.
Below code snippet renders properly on screen:
return WebView(
      initialUrl: new Uri.dataFromString(rawText, mimeType: 'text/html', encoding: Encoding.getByName("UTF-8")).toString(),
    );

code sample
  Widget build(BuildContext context) {
    final text = "
TEST

";
    return Scaffold(
      appBar: AppBar(),
      body: WebView(
        initialUrl: Uri.dataFromString(text, mimeType: 'text/html', encoding: Encoding.getByName("UTF-8")).toString(),
        javascriptMode: JavascriptMode.unrestricted,
      )
    );
  }

Your code snippet # 2 could be related to 33105

Without additional information we are unfortunately not sure how to resolve this issue.
We are therefore reluctantly going to close this bug for now.
Please don't hesitate to comment on the bug if you have any more information for us; we will reopen it right away!
Thanks for your contribution.

i think the problem is:

on android emulator, flutter webview shows white screen (but url links are clickable and everything is working like a headless webview ...)
on real android phone, flutter webview works very well ...


"sing System.Transactions;"

Minor typo.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: e7e17e30-4349-3193-01f1-5eb33cb88546
Version Independent ID: dcb6d719-ffc2-2796-c82c-b9873b74cb76
Content: Working with Transactions - EF6
Content Source: entity-framework/ef6/saving/transactions.md
Product: entity-framework
Technology: entity-framework-6
GitHub Login: @divega
Microsoft Alias: divega

Thanks @shadow7412, I've corrected the typo!


Swap Ubuntu for BusyBox in our test suite

This avoids the Launchpad issue (#25 / #26) and gives us something small enough that I don't feel bad about leaving in the non-amd64 architectures so we keep the original pristine upstream library file as-is.
(See https://github.com/docker-library/official-images/pull/16356 :rocket:)

Just need to wait for the busybox:latest images to populate into oisupport/staging-* and then regenerate to fix CI


Investigate how to integrate the front-end client with AWS cognito

Investigate how to integrate  (and tentatively do the actual integration) the front-end client with AWS Cognito (sign-in/sign-up flow).

@YuryDG this is top priority now front-end wise.

@YuryDG , this looks interesting https://github.com/maxmantz/redux-oidc

Here, this field with value response_type: "token" allowed the integration OK, but the there was an error in the response "unexpected filed token_id" or something like that.
With value response_type: "id_token token" as it is now, the integration is failing with Cognito, we need to investigate further if it's just a matter of tweaking the handling in the response or if the arguments provided in the request need to be changed.
In the end, if we use a different library or component to do the integration react-cognito, this may not be needed after all. And the config is different, what's import is the following:
The authority url is as follow: https://cognito-idp.<region>.amazonaws.com/<user_pool_id>/ -- we need to allow receiving region and user_pool_id as arguments, maybe as environment variables
And the url https://cognito-idp.<region>.amazonaws.com/<user_pool_id>/.well-known/openid-configuration contain all the info we need.
Also, we must allow receiving the client id/secret as variables.
For now develop contains a PoC so we can move in that direction

Integration PoC was successful after 84e796a99e9a4224f0e4906301b55ee710509567 was done in develop.
More info on how to tweak this implementation in future can be found at:
https://aws.amazon.com/blogs/mobile/understanding-amazon-cognito-user-pool-oauth-2-0-grants/

When I did this PoC I used the Implicit Grant flow. For our use case we should use the Authorization Grant flow, hence I'm reopening the issue.
Some useful reading may be https://medium.com/codefully-io/authentication-with-aws-cognito-react-and-express-b3acf17d37e6

@YuryDG is this ticket still in progress?
Can you update it's status if needed?

I think this is almost done, I'll update after making some test,


387 links in error page

#387
When the server encounters an error (like 404) it returns a page that has no links to navigate.
The error page needs to be modified so that it includes employee portal's navigation bar on the error page.
New files created in directory \resources\views\errors :

404.blade.php
419.blade.php
429.blade.php
500.blade.php
503.blade.php
The above files will be served on all 404, 419, 429, 500, 503 errors generated by the application, respectively. The views within this directory are named to match the HTTP status code they correspond to and Laravel will automatically return the view that matches the exception status code.
layout.blade.php: Basic layout of error page. This file extends the \resources\views\layouts\app.blade.php which contains the code for the nav bar. In the content section, custom.blade.php yields the error details.

@abhishek-pokhriyal Please resolve the conflicts.

@wevekamola please review

@abhishek-pokhriyal LGTM 👍  @rathorevaibhav please do have a quick look before merging.

@bohraji please review the changes.

@abhishek-pokhriyal any update on this?
https://github.com/ColoredCow/employee-portal/pull/470#discussion_r196747842

@abhishek-pokhriyal while testing this, in one of the screens where a 500 (internal server) error was expected, in the debug mode off I am still able to see the earlier screen without any links. For reference, here's a screenshot:

Is there anything that I'm missing?

@rathorevaibhav I think I would need to have a good look at this.

@rathorevaibhav I have used a different approach this time and I have updated the status. Please check now.

@abhishek-pokhriyal It works now. But it's only coming up in case of 500 and 404 errors. Did you target 403 access denied in this PR or are you considering in another fix?
If I have an employee role and I hit the route /finance/reports, I still see the Laravel default error page. Not the custom one.

Also, since you did code changes, I'll suggest you request a review from @wevekamola again.

@rathorevaibhav 403 is also done.

@wevekamola Significant changes were made in the code of this PR. Please review it again.

@abhi1203 PR is approved. Please see that the Failing check is correct before merging. Work with @rathorevaibhav on it.

@bohraji yup, I'll check that why it's failing.
Just a side note abhi1203 is not my username, mine is abhishek-pokhriyal.


[E.showMenu] Title of selected item in options array appears in subsequent list

Affected hardware version
Bangle 2
Your firmware version
2v18
The bug
Description
When using the array version of menus along with E.showMenu (as described in the docs), while navigating from one menu to another, the selected item on the first menu appears in the second menu.
Expected Behaviour
The second menu renders normally and the first menu can no longer be seen.
Reproduction steps

Open web IDE, write the following code. Note that only the first menu needs to be the "array" type to reproduce.

let menu = [
  { title:"A"},
  { title:"B"},
  { title:"C", onchange:function() { E.showMenu(submenu); } },
];
menu[""] = { title:"Hello" };

let submenu = {
  "" : { title : "World", back : function() { E.showMenu(menu); } },
  "One" : undefined,
  "Two" : undefined,
  "Three" : undefined,
  "Four" : undefined
};

E.showMenu(menu);

When the code loads, select item "C".
Note that the second menu renders normally but with "C" superimposed (this follows scrolling motions too).
Note that the menu item that lingers from one to the other is the one you pressed to navigate.

The lingering button cannot be interacted with, but it can be cleared when an element underneath it is pressed such that it refreshes its render.
Root cause hypothesis:
Relevant file: https://github.com/espruino/Espruino/blob/bc52028cb9271c4901259c6d399835715c2868a8/libs/js/banglejs/E_showMenu_Q3.js#L4
The issue I think becomes pretty clear when you compare the code for handling "onchange" versus an object-type-menu that just has items that are functions. In the case where we are seeing the bug we have:
if (item.onchange) item.onchange(item.value);
scr.scroll = l.scroller.scroll; // set scroll to prev position
show(); // redraw original menu

And in the case where we have no bug we haveL
if ("function" == typeof item) item(l);
else if ("object" == typeof item) {

Proposed solution:
Add an "onSelect" parameter that would be distinct from "onchange" in that it would just execute the function and not do anything else afterward. This would allow the array type menu to be closer in functionality to the object type menu without any backwards compatibility issues. I will see about getting a PR together if that seems like a good solution.
Alternate hypothesis
It is possible that I should not be using onchange for navigation. There may be some other parameter that's more suitable that isn't documented. I will close this if I find such a thing!
Installed apps
Default apps only plus one custom keyboard library [kbmatry]

There is a known workaround to use setTimeout to have the onchange callback called after the draw and not nice versa.
{ title:"C", onchange:function() { setTimeout(() => E.showMenu(submenu)) } },

There is a known workaround to use setTimeout to have the onchange callback called after the draw and not nice versa.
{ title:"C", onchange:function() { setTimeout(() => E.showMenu(submenu)) } },

That's good to know. Is this issue a duplicate by chance? I did look around but didn't see anything open.

I wasn't aware of this bug, but I did run into it in one of my menus and thought I was doing something wrong. Using a setTimeout fixed it.
setTimeout(() => {
  E.showMenu(createMainMenu());
},(0));

Thank you :)

Thanks - in the old menu style ({ "text": function}) this shouldn't be an issue - as @philipandresen noted it seems this only happens for menus where you have an onchange handler.
I think the nicest option is actually to make the menu detect if it's still 'active' (eg if setUI was called during the onChange handler) and only redraw if so... so that should fix any other issues in code where setTimeout had to be added as well.
I've just put a fix in for this, so I think we're good now


Add support for iOs 16.1

All those changes have now been merged one-by-one in the master branch. Closing this


Add validation to /login params

@esaminu can you please add more info what validation on the /login route entails?


chore(go.mod): Switch to upstream lzip package

This reverts commit a902fcc00a188fb940b75bb3db65a2cb44636a58.
See also #421.

@mholt My account had been flagged for about a month. It's unclear as to why.

Oh, it's you! :smile:
I'm so tired, sorry I didn't even notice. I got back from a trip and am tiredly working through a big backlog so I have like 50 tabs open. Sorry!
Thanks for the lib. Sorry to hear about the false flag on your account, I hate it when that kind of stuff happens.


Feature Request: Support of mouse on Desktop

I've tried, It works on my mobile devices, but not on desktop/laptop with mouse.
Is it feasible to add support for this?

^^^Second this; is it possible?

+1

Any update on this? I found this plugin very useful. but problem is support in Desktop browsers.
Can you please help on the same? any code?
Thanks

Operating these kind of operations on a mouse or trackpad based input sounds like a dreadful idea af far as usability is concerned.
On touch based devices much less so (surface or many laptops). The question is: Does it work with those? If not, it would be a nice addition.


Druid Wildshape crash, Repeatable

Druids that have the Umbral Cloak ability from either cross classing as a Moonlit Warlock or a Way of the Silhouette Monk crash while Wild Shaping.

No save no bug.

EASY TO REPRODUCE.zip
No further reports will be made.

Thanks. This is exactly what we need. If we have to setup a new hero, open a campaign, and test for every single reported issue...
You got it.


[DOC] fix: delete gsoc announcement from landing page

Reference Issues/PRs
Fixes #2510.

What does this implement/fix? Explain your changes.

Delete the GSoC announcement from the landing page.
Does your contribution introduce a new dependency? If yes, which one?

What should a reviewer concentrate their feedback on?

Any other comments?

PR checklist

For all contributions

[ ] I've added unit tests and made sure they pass locally.
[x] The PR title starts with either [ENH], [DOC] or [BUG] indicating whether the PR topic is related to enhancement, documentation or bug

@fkiraly, I like the idea with "join the contributor onboarding week", but I think we should update  the onboarding days page first, and then publish it, I'll bring it up for discussion next week (Monday preferably)

ok, makes sense let´s start with removal then.
We´ll update with the onborading days for 0.12.0 then

@GuzalBulatova Thanks for fixing link to my website!


I get UnhandledPromiseRejection warning when sql has error

try to execute this code:
return athenaUtil.createClient({ bucketUri: 'MY S3 OUTPUT' }, { region: process.env.AWS_REGION }).execute('BAD SQL STRING').toStream();
it will throw "UnhandledPromiseRejectionWarning: InvalidRequestException: line 1:1: mismatched input 'BAD' expecting"

I can see it's working good, i miss the "error" event on the stream, i am closing the issue.


Easy, medium, hard distributions

Hi, please sync your repo with the main branch and then send a pull request.


Disconnect log issue

After remote GL window closed, server log contins this message:
WARNING: Connection.fastRequest(): write: software caused connection abort (ECONNABORTED)
WARNING: Server._onAnswerException(): readcb: connection reset by peer (ECONNRESET)
EOFError: read end of file
 in read at stream.jl:929
 in answer at g:\my\projects\jevo\src\net\Connection.jl:133
 [inlined code] from g:\my\projects\jevo\src\net\Server.jl:174
 in anonymous at task.jl:447INFO: Client has disconnected

Closed in commit

Closed in commit


tensorflow-haskell: Unbreak / update to Tensorflow 2.4

Motivation for this change
This just updates the Haskell Tensorflow bindings to Tensorflow 2.4, which has been the default version for a few months.
This supersedes
https://github.com/NixOS/nixpkgs/pull/111399
... which has stalled. As per the discussion there, I'm submitting a fresh pull request.
Things done

[ ] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[ ] NixOS
[X] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[X] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[X] Ensured that relevant documentation is up to date
[X] Fits CONTRIBUTING.md.

@cdepillabout Ah, sorry - forgot that bit again. Done.

Thanks for fixing this.
When compiling tensorflow-ops, I'm seeing a problem with the tests:
$ nix-broken -A haskellPackages.tensorflow-ops
these derivations will be built:
  /nix/store/3aws1msvblwnpwig3whn8r5dh4gfias6-tensorflow-ops-<IP_ADDRESS>.drv
building '/nix/store/3aws1msvblwnpwig3whn8r5dh4gfias6-tensorflow-ops-<IP_ADDRESS>.drv'...
setupCompilerEnvironmentPhase
Build with /nix/store/2ip3lwzqswai3zz33407h4b2q3har28p-ghc-8.10.4.
unpacking sources
unpacking source archive /nix/store/7yn2qvqpvbm460fkdhzvwzja985pfgmb-source
source root is source/tensorflow-ops
patching sources
compileBuildDriverPhase
setupCompileFlags: -package-db=/build/setup-package.conf.d -j4 +RTS -A64M -RTS -threaded -rtsopts
[1 of 1] Compiling Main             ( Setup.hs, /build/Main.o )
Linking Setup ...
configuring
configureFlags: --verbose --prefix=/nix/store/vx502lr8cqhamy7yp4vwp338lnki7qfg-tensorflow-ops-<IP_ADDRESS> --libdir=$prefix/lib/$compiler --libsubdir=$abi/$libname --docdir=/nix/store/0603zibs9q8
vc88d964ngpm8yw20c4gx-tensorflow-ops-<IP_ADDRESS>-doc/share/doc/tensorflow-ops-<IP_ADDRESS> --with-gcc=gcc --package-db=/build/package.conf.d --ghc-options=-j4 +RTS -A64M -RTS --disable-split-objs --e
nable-library-profiling --profiling-detail=exported-functions --disable-profiling --enable-shared --disable-coverage --enable-static --disable-executable-dynamic --enable-tests --disable-ben
chmarks --enable-library-vanilla --disable-library-for-ghci --ghc-option=-split-sections --extra-lib-dirs=/nix/store/hdpihl2yn8cpdqmc9sysbh3fvwsxchky-ncurses-6.2/lib --extra-lib-dirs=/nix/st
ore/vzqia3jcpy0xdqh4nzmw5qmdv6hx27dp-libffi-3.3/lib --extra-lib-dirs=/nix/store/ak9n4w3nsnvn5gxqyi3dhc342yk9ia06-gmp-6.2.1/lib
Using Parsec parser
Configuring tensorflow-ops-<IP_ADDRESS>...

...

[1 of 1] Compiling Main             ( tests/QueueTest.hs, dist/build/QueueTest/QueueTest-tmp/Main.o )
Linking dist/build/QueueTest/QueueTest ...
Preprocessing test suite 'BuildTest' for tensorflow-ops-<IP_ADDRESS>..
Building test suite 'BuildTest' for tensorflow-ops-<IP_ADDRESS>..
[1 of 1] Compiling Main             ( tests/BuildTest.hs, dist/build/BuildTest/BuildTest-tmp/Main.o )
Linking dist/build/BuildTest/BuildTest ...
running tests
Running 14 test suites...
Test suite OpsTest: RUNNING...
Test suite OpsTest: PASS
Test suite logged to: dist/test/tensorflow-ops-<IP_ADDRESS>-OpsTest.log
Test suite GradientTest: RUNNING...
Test suite GradientTest: PASS
Test suite logged to: dist/test/tensorflow-ops-<IP_ADDRESS>-GradientTest.log
Test suite MatrixTest: RUNNING...
Test suite MatrixTest: PASS
Test suite logged to: dist/test/tensorflow-ops-<IP_ADDRESS>-MatrixTest.log
Test suite VariableTest: RUNNING...
Test suite VariableTest: PASS
Test suite logged to: dist/test/tensorflow-ops-<IP_ADDRESS>-VariableTest.log
Test suite ArrayOpsTest: RUNNING...
Test suite ArrayOpsTest: PASS
Test suite logged to: dist/test/tensorflow-ops-<IP_ADDRESS>-ArrayOpsTest.log
Test suite NNTest: RUNNING...
Test suite NNTest: PASS
Test suite logged to: dist/test/tensorflow-ops-<IP_ADDRESS>-NNTest.log
Test suite RegressionTest: RUNNING...
Test suite RegressionTest: PASS
Test suite logged to: dist/test/tensorflow-ops-<IP_ADDRESS>-RegressionTest.log
Test suite TypesTest: RUNNING...
Test suite TypesTest: PASS
Test suite logged to: dist/test/tensorflow-ops-<IP_ADDRESS>-TypesTest.log
Test suite MiscTest: RUNNING...
Test suite MiscTest: PASS
Test suite logged to: dist/test/tensorflow-ops-<IP_ADDRESS>-MiscTest.log
Test suite EmbeddingOpsTest: RUNNING...
Test suite EmbeddingOpsTest: PASS
Test suite logged to: dist/test/tensorflow-ops-<IP_ADDRESS>-EmbeddingOpsTest.log
Test suite DataFlowOpsTest: RUNNING...
Test suite DataFlowOpsTest: PASS
Test suite logged to: dist/test/tensorflow-ops-<IP_ADDRESS>-DataFlowOpsTest.log
Test suite TracingTest: RUNNING...
Test suite TracingTest: PASS
Test suite logged to: dist/test/tensorflow-ops-<IP_ADDRESS>-TracingTest.log
Test suite QueueTest: RUNNING...
2021-04-15 01:46:48.721476: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU
 instructions in performance-critical operations:  AVX2
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2021-04-15 01:46:48.738886: I tensorflow/core/platform/profile_utils/cpu_utils.cc:112] CPU Frequency:<PHONE_NUMBER> Hz
testBasic: [Failed]
ERROR: Malformed TF_STRING tensor; Result: incomplete input
CallStack (from HasCallStack):
  error, called at src/TensorFlow/Types.hs:326:25 in tensorflow-<IP_ADDRESS>-6G0yW4KI5NJCJocu4cHCKp:TensorFlow.Types
testPump: [Failed]
ERROR: Malformed TF_STRING tensor; Result: incomplete input
CallStack (from HasCallStack):
  error, called at src/TensorFlow/Types.hs:326:25 in tensorflow-<IP_ADDRESS>-6G0yW4KI5NJCJocu4cHCKp:TensorFlow.Types
TensorFlowException TF_CANCELLED "Run call was cancelled"
testAsync: [Failed]
ERROR: Malformed TF_STRING tensor; Result: incomplete input
CallStack (from HasCallStack):
  error, called at src/TensorFlow/Types.hs:326:25 in tensorflow-<IP_ADDRESS>-6G0yW4KI5NJCJocu4cHCKp:TensorFlow.Types

         Test Cases  Total
 Passed  0           0
 Failed  3           3
 Total   3           3
Test suite QueueTest: FAIL
Test suite logged to: dist/test/tensorflow-ops-<IP_ADDRESS>-QueueTest.log
Test suite BuildTest: RUNNING...
Test suite BuildTest: PASS
Test suite logged to: dist/test/tensorflow-ops-<IP_ADDRESS>-BuildTest.log
13 of 14 test suites (13 of 14 test cases) passed.
builder for '/nix/store/3aws1msvblwnpwig3whn8r5dh4gfias6-tensorflow-ops-<IP_ADDRESS>.drv' failed with exit code 1
error: build of '/nix/store/3aws1msvblwnpwig3whn8r5dh4gfias6-tensorflow-ops-<IP_ADDRESS>.drv' failed

Are you not seeing this error?

@cdepillabout Yes, I see it: Sorry for that - I ran the tests in a slightly different environment, I see now. I'll investigate, but might take me a few days.
Thanks for the feedback!

@mikesperber No problem, thanks for looking into this :-)

Just logging some debugging work:

the problem is in decoding bytestrings, the general queue functionality seems to work
building from source in Stack, using nightly-2021-04-06 (same version as the Nix branch is using), does not exhibit this problem

I'm still on this one, it's just slow-going.

Didn’t mean to rush you, I deleted the branch by accident which makes GitHub close all PRs targeted at it. Apologies!

On 19. May 2021, at 08:06, Mike Sperber @.***> wrote:

I'm still on this one, it's just slow-going.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub, or unsubscribe.

Just rebased the patch and did a bit more debugging.
The offsets for decoding strings seem to be out of whack. In QueueTest, the correct FFI.TensorData records for the strings look like this:
tensorData: TensorData {tensorDataDimensions = [], tensorDataType = DT_STRING, tensorDataBytes = [0,0,0,0,0,0,0,0,2,72,105]}
tensorData: TensorData {tensorDataDimensions = [], tensorDataType = DT_STRING, tensorDataBytes = [0,0,0,0,0,0,0,0,3,66,97,114]}
tensorData: TensorData {tensorDataDimensions = [], tensorDataType = DT_STRING, tensorDataBytes = [0,0,0,0,0,0,0,0,3,66,97,122]}
tensorData: TensorData {tensorDataDimensions = [], tensorDataType = DT_STRING, tensorDataBytes = [0,0,0,0,0,0,0,0,3,66,97,122]}
tensorData: TensorData {tensorDataDimensions = [], tensorDataType = DT_STRING, tensorDataBytes = [0,0,0,0,0,0,0,0,5,65,115,121,110,99]}
tensorData: TensorData {tensorDataDimensions = [], tensorDataType = DT_STRING, tensorDataBytes = [0,0,0,0,0,0,0,0,5,65,115,121,110,99]}

The broken ones I'm seeing look like this:
tensorData: TensorData {tensorDataDimensions = [], tensorDataType = DT_STRING, tensorDataBytes = [8,72,105,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}
dataBytes: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
tensorData: TensorData {tensorDataDimensions = [], tensorDataType = DT_STRING, tensorDataBytes = [12,66,97,122,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}
dataBytes: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
tensorData: TensorData {tensorDataDimensions = [], tensorDataType = DT_STRING, tensorDataBytes = [20,65,115,121,110,99,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}
dataBytes: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Feels like there's an offset of 8 going on.

Superseded by #217812.


Cannot recover from stack overflow.

hi.first of all sorry for my english.
i don't khnow why i get this error.
my bot work correctly but some times breaks by this error
`Fatal Python error: Cannot recover from stack overflow.
Current thread 0x00007fbb6d513700 (most recent call first):
File "/usr/local/lib/python3.6/socket.py", line 655 in close
File "/usr/local/lib/python3.6/http/client.py", line 403 in _close_conn
File "/usr/local/lib/python3.6/http/client.py", line 553 in _get_chunk_left
File "/usr/local/lib/python3.6/http/client.py", line 563 in _readall_chunked
File "/usr/local/lib/python3.6/http/client.py", line 456 in read
File "/usr/local/lib/python3.6/site-packages/urllib3/response.py", line 380 in read
File "/usr/local/lib/python3.6/site-packages/urllib3/response.py", line 159 in init
File "/usr/local/lib/python3.6/site-packages/urllib3/response.py", line 467 in from_httplib
File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 617 in urlopen
File "/usr/local/lib/python3.6/site-packages/urllib3/poolmanager.py", line 321 in urlopen
File "/usr/local/lib/python3.6/site-packages/urllib3/poolmanager.py", line 349 in urlopen
File "/usr/local/lib/python3.6/site-packages/urllib3/request.py", line 87 in request_encode_url
File "/usr/local/lib/python3.6/site-packages/urllib3/request.py", line 66 in request
File "ultimate3.py", line 296 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
File "ultimate3.py", line 300 in detect
...
Thread 0x00007fbb6e388700 (most recent call first):
File "/usr/local/lib/python3.6/ssl.py", line 631 in read
File "/usr/local/lib/python3.6/ssl.py", line 871 in read
File "/usr/local/lib/python3.6/ssl.py", line 1009 in recv_into
File "/usr/local/lib/python3.6/socket.py", line 586 in readinto
File "/usr/local/lib/python3.6/http/client.py", line 258 in _read_status
File "/usr/local/lib/python3.6/http/client.py", line 297 in begin
File "/usr/local/lib/python3.6/http/client.py", line 1331 in getresponse
File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 383 in _make_request
File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 601 in urlopen
File "/usr/local/lib/python3.6/site-packages/urllib3/poolmanager.py", line 321 in urlopen
File "/usr/local/lib/python3.6/site-packages/urllib3/request.py", line 148 in request_encode_body
File "/usr/local/lib/python3.6/site-packages/telepot/api.py", line 154 in request
File "/usr/local/lib/python3.6/site-packages/telepot/init.py", line 491 in _api_request
File "/usr/local/lib/python3.6/site-packages/telepot/init.py", line 993 in getUpdates
File "/usr/local/lib/python3.6/site-packages/telepot/loop.py", line 60 in run_forever
File "/usr/local/lib/python3.6/threading.py", line 864 in run
File "/usr/local/lib/python3.6/threading.py", line 916 in _bootstrap_inner
File "/usr/local/lib/python3.6/threading.py", line 884 in _bootstrap
Thread 0x00007fbb6eb89700 (most recent call first):
File "/usr/local/lib/python3.6/site-packages/telepot/init.py", line 458 in run
File "/usr/local/lib/python3.6/threading.py", line 916 in _bootstrap_inner
File "/usr/local/lib/python3.6/threading.py", line 884 in _bootstrap
Thread 0x00007fbb6f38a700 (most recent call first):
File "/usr/local/lib/python3.6/threading.py", line 295 in wait
File "/usr/local/lib/python3.6/queue.py", line 164 in get
File "/usr/local/lib/python3.6/site-packages/telepot/loop.py", line 36 in run_forever
File "/usr/local/lib/python3.6/site-packages/telepot/loop.py", line 160 in run_forever
File "/usr/local/lib/python3.6/threading.py", line 864 in run
File "/usr/local/lib/python3.6/threading.py", line 916 in _bootstrap_inner
File "/usr/local/lib/python3.6/threading.py", line 884 in _bootstrap
Thread 0x00007fbb7573d700 (most recent call first):
File "ultimate3.py", line 480 in
`

line296
`

try:
   line296 response = self.s.request("get",link, timeout=2).data # get page data from server
except:
  time.sleep(1)
  self.detect(url=link):

`

line 296 and 300 is in the same function
my function is:
`

292-def detect(self,url):
293-
294-     link = url
295-     try:
296-          response = self.s.request("get",link, timeout=2).data  # get page data from server,
297-     except:
298-
299-         time.sleep(1)
300-         self.detect(url=link)
301-     doc = html.document_fromstring(response)
302-     #detect film&serial
303-     element=doc.cssselect(".category > a")
304-     ser=doc.xpath("/html/body/section/div[3]/div[1]/div/article/div[1]/h1/a")[0].text_content()
305-
306-     self.category="film"
307-     for elem in element:
308-       if  "سریال" in elem.text_content() or "سریال" in ser:
309-         self.category="serial"
310-     if self.category != "serial":
311-
312-        self.catchfilm(url)
313-     if self.category == "serial":
314-        self.catchsserial(url)
`

and line 480 is end of code
`

while 1:
time.sleep(10)
`

thanks for your help

Hello @javadfarah,
you might want to refactor your Exception-handling as you built a loop that caused a stack overflow.
For example you could replace lines 295 up until 300 with:
retries = 5
for retry in range(1, retries + 1):
  try:
    response = self.s.request("get", link, timeout=2).data
  except Exception as err:
    print("Failed to fetch data from {url} [{retry}/{retries}]: {err}".format(
      url=url, retry=retry, retries=retries err=repr(err)))
    time.sleep(retry)
  else:
    break
else:
  print("Failed %s times to fetch data from %s" % (retries, url))
  return

Good luck!

hello @das7pad thank you for reply but i want to send a correct answer to my user! i cannot tel him i'm sorry test again! so i should make a loop until get sightly response

You could increase the retries value to 10000 - even a while True loop has the same effect. It is a solution for the shown error as the retries do not stack anymore, they stay at the same level.


[BACKLOG-19704] Including sub trans steps in metrics

Build Completed
:fire: This pull request has some issues. It would be preferable to fix them in order for it to be just perfect. See below for more details. Some links are also available below for further assistance in addressing those issues.
Build Commands
mvn -Dsurefire.runOrder=alphabetical -B -fn -f 'pom.xml' -pl 'ui,engine' -P '!assemblies' -amd clean install && mvn -B -f 'pom.xml' -pl 'ui,engine' -P '!assemblies' -amd site

Cleanup Commands
mvn -B -f 'pom.xml' -pl 'ui,engine' -P '!assemblies' -amd build-helper:remove-project-artifact

Changed files
  engine/src/main/java/org/pentaho/di/trans/SubtransExecutor.java
  engine/src/main/java/org/pentaho/di/trans/step/StepInterface.java
  engine/src/main/java/org/pentaho/di/trans/step/StepStatus.java
  engine/src/test/java/org/pentaho/di/trans/SubtransExecutorTest.java
  ui/src/main/java/org/pentaho/di/ui/spoon/trans/TransGridDelegate.java

Unit Test Coverage
These statistics help you identify how your changes have affected the coverage of the following files. If a file is not in this list, then its coverage was not affected by your changes. To get some help interpreting these metrics, please refer to Jacoco's documentation.

:warning: Coverage Changes: <0.1% (click to expand)
org.pentaho.di.job.entries.evalfilesmetrics.JobEntryEvalFilesMetrics

Branch Change: -0.4% :small_red_triangle_down:
Complexity Change: -0.5% :small_red_triangle_down:

:new: org.pentaho.di.trans.step.StepInterface

Coverage: 0% :exclamation:

org.pentaho.di.trans.steps.checksum.CheckSumMeta

Instruction Change: -0.1% :small_red_triangle_down:

org.pentaho.di.trans.steps.datagrid.DataGridMeta

Branch Change: -2% :small_red_triangle_down:
Complexity Change: -1.7% :small_red_triangle_down:
Instruction Change: -0.2% :small_red_triangle_down:

org.pentaho.di.trans.steps.dbproc.DBProcMeta

Instruction Change: -0.1% :small_red_triangle_down:

org.pentaho.di.trans.steps.ldapinput.LDAPInputMeta

Branch Change: -1.6% :small_red_triangle_down:
Complexity Change: -0.9% :small_red_triangle_down:
Instruction Change: -0.1% :small_red_triangle_down:

org.pentaho.di.trans.steps.ldapoutput.LDAPOutputMeta

Branch Change: -1.3% :small_red_triangle_down:
Complexity Change: -0.9% :small_red_triangle_down:
Instruction Change: -0.2% :small_red_triangle_down:

org.pentaho.di.trans.steps.memgroupby.MemoryGroupByMeta

Instruction Change: -0.2% :small_red_triangle_down:
Line Change: -0.5% :small_red_triangle_down:

org.pentaho.di.trans.steps.rowgenerator.RowGeneratorMeta

Instruction Change: -0.1% :small_red_triangle_down:

org.pentaho.di.trans.steps.singlethreader.SingleThreaderMeta

Instruction Change: -0.1% :small_red_triangle_down:

org.pentaho.di.trans.steps.sortedmerge.SortedMergeMeta

Instruction Change: -0.2% :small_red_triangle_down:

org.pentaho.di.trans.steps.tableoutput.TableOutputMeta

Branch Change: -0.9% :small_red_triangle_down:
Complexity Change: -0.8% :small_red_triangle_down:

org.pentaho.di.trans.SubtransExecutor

Complexity Change: -1.6% :small_red_triangle_down:
Method Change: -14.3% :small_red_triangle_down:

org.pentaho.di.www.cache.CarteStatusCache

Instruction Change: -1.2% :small_red_triangle_down:
Line Change: -1.3% :small_red_triangle_down:

org.pentaho.di.trans.steps.googleanalytics.GaInputStepMeta

Branch Change: -1.9% :small_red_triangle_down:
Complexity Change: -1.1% :small_red_triangle_down:

Note: The list of offending coverage changes extends beyond the presented results and was truncated to prevent reaching the comment size limit.

@pentaho/ackbar please review and merge


Deprecate kubernetes_service_patch lib for Juju's default k8s charm service

Issue
This library has been used to patch the Kubernetes service created by Juju during the deployment of a charm to open ports on the unit and such. This functionality is available in Ops, as part of ops.Unit.set_ports. However, this library is still used by charms like traefik-k8s to provide loadbalancing capabilities by creating/patching k8s LB services.
Solution

Add deprecation warning if the library is used to patch ClusterIP services and that ops.Unit.set_ports should be used instead.
Update docstring to mention the same as well as that the library is now only intended to be used for creating/patching LoadBalancer k8s services.

@michaeldmitry If the LB creation functionality is indeed only used in traefik, can't we just copy the code there and deprecate the whole lib?

@michaeldmitry If the LB creation functionality is indeed only used in traefik, can't we just copy the code there and deprecate the whole lib?

@simskij not only by traefik. its used by mlflow-operator, consul-k8s-operator, several sunbeam charms for similar purposes as traefik


How to execute smart mic with KWS

I tried to execute Smart mic project with KWS (real time) example as given in "Smart mic - "https://www.st.com/en/embedded-software/fp-aud-smartmic1.html"  and KWS - "https://github.com/ARM-software/ML-KWS-for-MCU". I got some issue in detection. Here ,I used STM32F769NI Evaluation board. There was random detection, not getting proper keyword detection. I assured that my Mic output data is right(checked on AUDACITY) , but not detect keyword using KWS ( detect random index of keyword string).
My audio_buffer_In  input size is (2560). recording window 3, frame_shift  320.
Where i was wrong ? Which steps i have to follow for proper keyword detection ?
my detection routine in main is as follows:
when come into main below function i called:
'''
kws = new KWS_F769NI(recording_win, averaging_window_len);
// detection started in while loop
while(1)
{
if(BufferState == 1) //state comes when audio_buffer_In  filled with data size 2560/2 i.e  80msec audio
{
BufferState = 0;
if(kws->frame_len!=kws->frame_shift)   //copy the last (frame_len - frame_shift) audio data to the start
{
arm_copy_q7((q7_t )(kws->audio_buffer)+2(kws->audio_buffer_size-(kws->frame_len-kws->frame_shift)), (q7_t )kws->audio_buffer, 2(kws->frame_len- kws->frame_shift));
}
// copy the new recording data
for (int i=0;iaudio_block_size;i++)
{
kws->audio_buffer[kws->frame_len-kws->frame_shift+i] = audio_buffer_In  [i*2];
}
run_kws();
else
{
if(BufferState == 2)  //state comes when audio_buffer_In  filled with data size 2560/2  i.e  80msec audio data
{
BufferState = 0;
if(kws->frame_len != kws->frame_shift)   //copy the last (frame_len - frame_shift) audio data to the start
{
memmove((q7_t )(kws->audio_buffer)+2(kws->audio_buffer_size-(kws->frame_len-kws->frame_shift)), (q7_t )kws->audio_buffer, 2(kws->frame_len-kws- >frame_shift));
}
// copy the new recording data
for (int i=0;iaudio_block_size;i++){
kws->audio_buffer[kws->frame_len-kws->frame_shift+i] = audio_buffer_In  [2kws-
>audio_block_size+i2];
}
}
'''
Where i was wrong ? Which steps i have to follow for proper keyword detection ?

Hi, vrushalibhokare.
I'm also working on this project on STM32F412 using MEMS MIC (X-Nucleo-CCA02M1). Sorry I couldn't figure out your problem in real time detection. But I got pretty good result in simple test without real time recording.
Also I got problem of recording using MEMS MIC as given in this link "https://www.st.com/content/st_com/en/products/embedded-software/mcus-embedded-software/stm32-embedded-software/stm32cube-expansion-packages/x-cube-memsmic1.html". Could you show me in detail how to do the audio streaming?
Regards,
Shawn

Hi zixiao1511034.
where did you stuck in that project??
"https://www.st.com/content/st_com/en/products/embedded-software/mcus-embedded-
software/stm32-embedded-software/stm32cube-expansion-packages/x-cube-memsmic1.html"
I also got good results in simple test without real time recording.
My current scenario is, using SMARTMIC project, i fill buffer with 16 numbers of
unsigned audio samples in every 1msec. till buffer fill with data size 2560/2 & pass to KWS (data size 2560/2 i.e 80msec audio ).
Unlike simple test of KWS, i'm sending real time data to kws.
i also sent 1 sec of real time data samples at a time continuously like Simple test of kws, but no luck.
Can you figure it out, what the missing link is?

Hi zixiao1511034.
I have used stm32f446 with X-Nucleo-CCA02M1(sound terminal board) & X-Nucleo-CCA02M2(MEMS board)
using USBD, you can see actual audio data on Audacity, & you can verify whether it's wrong or not.
Note: you need to check jumpers setting on both MEMS & Sound terminal card. you will find those in UM.
MEMS data is based on 16khz sampling rate & Sound terminal card is configure on 32khz.
you can see data coming out of MIC by using oscilloscope.
SMARTMIC code is fine to use as it is, but you need to check hardware.

@yanyanem.
I am trying to interface KWS (real time ) with Smart mic project ("https://www.st.com/en/embedded-software/fp-aud-smartmic1.html" ) .I got some issue in detection. Here ,I used STM32F769NI Evaluation board. There was random detection, not getting proper keyword detection. I assured that my Mic output data is right(checked on AUDACITY) , but not detect keyword using KWS ( detect random index of keyword string).
I have made all required changes, like put updated weight.h, OUT_DIM and char output_classes according to keyword .
My audio_buffer _size is 1280(for 30 ms), frame_shift_ms =10, frame_length_ms=40, recording window=3.
Which steps i have to follow for proper keyword detection ?
my detection routine in main is as follows:
when come into main below function i called:
'''
kws = new KWS_F769NI(recording_win, averaging_window_len);
// detection started in while loop
while(1)
{
if(BufferState == 1)
{
BufferState = 0;
	if(kws->frame_len!=kws->frame_shift) {
	//copy the last (frame_len - frame_shift) audio data to the start
	arm_copy_q7((q7_t *)(kws->audio_buffer)+2*(kws->audio_buffer_size-(kws->frame_len-kws->frame_shift)), (q7_t *)kws->audio_buffer, 2*(kws->frame_len-kws->frame_shift));
	}
	// copy the new recording data
	for (int i=0;i<kws->audio_block_size;i++) {
	kws->audio_buffer[kws->frame_len-kws->frame_shift+i] = Buffer[i*2];
	}
	run_kws();
  }
  else
  if(BufferState == 2)
  {
	BufferState = 0;
	if(kws->frame_len != kws->frame_shift) {
     arm_copy_q7((q7_t *)(kws->audio_buffer)+2*(kws->audio_buffer_size-(kws->frame_len-kws->frame_shift)), (q7_t *)kws->audio_buffer, 2*(kws->frame_len-kws->frame_shift));
	}
	for (int i=0;i<kws->audio_block_size;i++) {
	kws->audio_buffer[kws->frame_len-kws->frame_shift+i] = Buffer[2*kws->audio_block_size+i*2];
	}
	run_kws();
  }
return 0;

}
void run_kws()
{
kws->extract_features();    //extract mfcc features
kws->classify();	      //classify using dnn
kws->average_predictions();
int max_ind = kws->get_top_class(kws->averaged_output);
if(kws->averaged_output[max_ind]>detection_threshold*128/100)
{
if(max_ind == 3)
{
	  HAL_GPIO_WritePin(LED2_GPIO_PORT,LED2_PIN, GPIO_PIN_RESET);
	  HAL_Delay(2000);
	  HAL_GPIO_WritePin(LED2_GPIO_PORT,LED2_PIN, GPIO_PIN_SET);
     		}
}

sprintf(str ," index in %d and detection percentage %d \n\r", max_ind, kws->averaged_output[max_ind]);
I
Where i was wrong ? Which steps i have to follow for proper keyword detection ?

@vrushalibhokare @zixiao1511034
I trained speech_commandsv2. Accuracy is 94% on the test set, but on stm32f7x, no keywords are detected.
The problems caused by the quantized weights.h lead to inaccurate predictions. May I ask how to correct it.

@vrushalibhokare
Is your model detecting keywords correctly, what are the changes have you made and the how does the audio_buffer[size] data entering into the mfcc buffer [size], Can you explain it ?
Thanks


Having universe variables begin with u# instead 'u

Proposition of @nikswamy after using explicit universe : we could have u#a instead of 'ua and u#(max a b) instead of u#(max 'ua 'ub).

done !

Thanks for doing this so quickly!

Would be great to update: https://github.com/FStarLang/FStar/wiki/Explicit-universes

re-done :)