i am trying to get tower.js up and running. it looks awesome but i'm hitting a snag that seems to have something to do with the package itself.
if i run $tower new myapp or $tower create app myapp i get the following error:
node_modules/tower-server/index.js:46
this.bundle = new Bundle(this);
ReferenceError: Bundle is not defined
when i look at index.js i see a line at the top commented out that defines Bundle:
/**
* Module dependendencies.
*/
var application = {};
var express = require('express');
var sockjs = require('sockjs');
//var Bundle = require('tower-bundle');
var http = require('http');
var instance;`
tower-bundle is not in npm repos. i tried commenting out the Bundle instantiation but then nothing happens. i'm not sure what i'm doing wrong. any help is greatly appreciated.
i should also mention i installed tower and tower-cli globally using npm and i am running node 0.10+ (latest version as of this date.)
One of the maintainers of Tower here. The best way to get help is through Github issues. That's where we're active.
Yes, that command is currently not working. The bundler is also not complete, thus why it was commented out. Right now, we were concentrating mostly on the client-side of things. Right now, there's no use for scaffolding, but we'll be getting the server-side up to standards.
If you need any help, please visit our Github repositories, we'll be glad to help. FYI, the IRC channel is useless right now, we're never on it.
Related
I am very new to app development. I was trying to configure my GoogleSignInButton Callback function.
I get the error:
No active configuration. Make sure GIDClientID is set in Info.plist.
However, my Info.plist defines GIDClientID along with the value generated as advised here
OS: Version 13.0 Beta
Xcode: Version 14.1 beta 3
In order to resolve this issues, you don't need to add anything into the info.plist. you need to setup GIDSignIn.sharedInstance.configuration = config
https://github.com/WesCSK/SwiftUI-Firebase-Authenticate-Using-Google-Sign-In/blob/starting/README.md#updated-steps-for-v700-of-google-signin
guard let clientID = FirebaseApp.app()?.options.clientID else { return }
// Create Google Sign In configuration object.
let config = GIDConfiguration(clientID: clientID)
GIDSignIn.sharedInstance.configuration = config
....
Google documentation at Firebase Login methods is worse than....
So, if you are using 8.6.0 you can use GIDSignIn.sharedInstance.signIn(withPresenting: presentingVC), but add ClientID in Info.plist like here:
enter image description here
Regarding the main issue, from your picture I see that you put the URLSchema at GIDClientID, they are a little bit different.
Eg. GIDclientID: xxxx-xxxxxx.apps.googleusercontent.com
URLSchema: com.googleusercontent.apps.xxxx-xxxxxx.
Try like that.
I get my clientId using this line of debug in my code
guard let clientID = FirebaseApp.app()?.options.clientID
Same error. I'm newbie too, it helped for me to reinstall packages (GoogleSignIn and FirebaseAuth) with older versions (6.0.0 and 8.6.0) so GIDSignIn.sharedInstance.signIn(with: config, presenting: self) is available. This is a temporary solution till we find working way.
Don't add new property named "GIDClientID" into the Info.plist of target project, use CLIENT_ID which is defined in GoogleService-Info.plist instead.
Find more details here:
https://stackoverflow.com/a/74897652/19683708
This changes in google sign is new. Also GIDSignIn.sharedInstance.signIn(with: config, presenting: self) is not available anymore. GIDSignIn.sharedInstance.signIn(withPresenting: presentingVC) replaced it. But I got same error. Hope to someone find an answer
It looks like Vuepress is made for public docs, but we decided to add client and server security to protect some of the doc pages. But unfortunately although oidc-client (https://github.com/IdentityModel/oidc-client-js/wiki) works during dev, it throws exception when build.
I get ReferenceError: window is not defined and when I try to trick the compiler with const window = window || { location: {} }; I get TypeError: Cannot read property 'getItem' of undefined
Any idea how to make this work?
This was driving me nuts also. I discovered the component I was trying to add was looking at window.location in its code - this was triggering the error.
My understanding is that the build process has not access to Browser things like window etc.
As soon as I removed the window.location bit from my code things built just fine and all is well.
I'm listening to events of my deployed contract. Whenever a transaction gets completed and event is fired receiving the response causes following error:
Uncaught Error: Returned values aren't valid, did it run Out of Gas?
at ABICoder.push../node_modules/web3-eth-abi/src/index.js.ABICoder.decodeParameters
(index.js:227)
at ABICoder.push../node_modules/web3-eth-abi/src/index.js.ABICoder.decodeLog
(index.js:277)
Web3 version: 1.0.0-beta36
Metamask version: 4.16.0
How to fix it?
Try the command truffle migrate --reset so that all the previous values are reset to their original value
Throws the same error when inside a transaction it generates different events with the same name and the same arguments. In my case, this was the Transfer event from ERC721 and ERC20. Renaming one of them solves this problem, but of course this isn't the right way.
This is a bug in web3js, discussed here.
And the following change fixes it (source):
patch-package
--- a/node_modules/web3-eth-abi/src/index.js
+++ b/node_modules/web3-eth-abi/src/index.js
## -280,7 +280,7 ## ABICoder.prototype.decodeLog = function (inputs, data, topics) {
var nonIndexedData = data;
- var notIndexedParams = (nonIndexedData) ? this.decodeParameters(notIndexedInputs, nonIndexedData) : [];
+ var notIndexedParams = (nonIndexedData && nonIndexedData !== '0x') ? this.decodeParameters(notIndexedInputs, nonIndexedData) : [];
var returnValue = new Result();
returnValue.__length__ = 0;
Edit: Also downgrading to web3-1.0.0.beta33 also fixes this issue too.
Before even checking your ABI or redeploying, check to make sure Metamask is connected to whichever network your contract is actually deployed too. I stepped away and while i was afk Metamask logged out, I guess I wasn't watching closely and I was connected to Ropsten when I working on localhost. Simple mistake, wasted an hour or so trying to figure it out. Hope this helps someone else out!
This happened to me on my react app.
I deployed to contract to Ropsten network, but metamask was using the Rinkeby aaccount. So make sure whichever network you deployed, metamask should be using account from that network.
The solution for me was changing of provider. With Infura the error is gone, but with Alchemy is still happening.
Please check your Metamask Login, This issue is generally populated when you are either log out of the Metamask or worse case you have 0 ether left at your account.
This can also happen when the MNEMONIC value from Ganache is different from the one you have in your truffle.js or truffle-config.js file.
I'm trying to do authentication on my Android application using Xamarin.Auth. Some time ago, Google made the policy that you cannot do this in an embedded web view (for totally valid reasons).
I'm trying to open the account authentication page in a browser, but keep getting the embedded web view. I understand that isUsingNativeUI needs to be true in the following code:
_auth = new OAuth2Authenticator(clientId, string.Empty, scope,
new Uri(Constant.AuthorizeUrl),
new Uri(redirectUrl),
new Uri(Constant.AccessTokenUrl),
null,
isUsingNativeUI = true);
At every point in my application, this always equals true.
Elsewhere, I have code that redirects to what should be a browser:
var authenticator = Auth.GetAuthenticator();
Intent intent = authenticator.GetUI(this);
this.StartActivity(intent);
Regardless, I keep getting a dreaded 403 disallowed_useragent error whenever I try to run the project. Is there another element to this that I'm missing?
To my knowledge, setting auth.IsUsingNativeUI = true in the constructor should dictate that it must open in a browser. I've been following this example to try and debug with no success. I even pulled the guy's repo down to my machine and ran it - the Intent variable at the moment of redirection is almost identical.
Could there be something stupid that I'm missing? What else might be going wrong?
I realize this is an old question, but I had the same issue.
You have to install version 1.5.0.3 of the Xamarin.Auth Nuget package. The newest one (version 1.7.0 right now) doesn't work. You'll have to also install the PCLCrypto nuget package in order to get that version to work.
I can't seem to find anything official about this: Does Parse.Config work on Parse Server? It used to work on Parse.com but when I try to migrate to Parse.Server, when trying the REST API it seem to fail:
GET http://localhost:1337/parse/config
Passing in my app ID. I read somewhere Config does not work on Parse Server, but wanted to confirm
Although is not officially supported as mentioned on the docs,there is a way to make it work. It is still an experimental implementation though.
As mentioned here & here, you should set the environment variable:
PARSE_EXPERIMENTAL_CONFIG_ENABLED=1
Then restart your node server. In case you deployed it on heroku for example you should on cli heroku restart -a <APP_NAME>
If that doesn't work I would suggest to simply add your route with your configuration options on your project's index.js file where express is initialized like so.
var parseConfig = {
"params": { /*...put your options here*/ }
};
// :one? is for old SDK compatibility while is optional parameter.
app.all('/parse/:one?/config', function (req, res) {
res.json(parseConfig);
});