Giter VIP home page Giter VIP logo

Comments (9)

abrahamjuliot avatar abrahamjuliot commented on June 20, 2024

It means that the test silently failed to complete due to an unforeseen error.

from creepjs.

Kingkhan14 avatar Kingkhan14 commented on June 20, 2024

like which error bro any examples

from creepjs.

abrahamjuliot avatar abrahamjuliot commented on June 20, 2024

It can be any error produced by the client. There should be none. Are you seeing - failed prototype test execution in a clean browser?

from creepjs.

Kingkhan14 avatar Kingkhan14 commented on June 20, 2024

no only when using proxied object

from creepjs.

Kingkhan14 avatar Kingkhan14 commented on June 20, 2024
get(target, ctx) {
      var methods = ["call", "bind", "apply", "toString", "string"];
      if(methods.includes(ctx)) {
          return target[ctx].bind(target);
      } else if(typeof ctx === 'symbol') {
          return target[ctx];
      } else {
          return target.bind(target);
      }
  }

like this when using proxy

from creepjs.

abrahamjuliot avatar abrahamjuliot commented on June 20, 2024

I see. It's likely a side effect of the way that proxy object is written. I have no solution, but you can run the test script and log the error. Let's leave the issue open. I will set a task to auto log this error to the console.

from creepjs.

Kingkhan14 avatar Kingkhan14 commented on June 20, 2024

Ok will update

from creepjs.

flen201 avatar flen201 commented on June 20, 2024

i believe

Object prototype may only be an Object or null: undefined
TypeError: Object prototype may only be an Object or null: undefined
    at Reflect.setPrototypeOf (<anonymous>)
    at Object.setPrototypeOf (<anonymous>:361:46)
    at Function.setPrototypeOf (<anonymous>)
    at getNullConversionTypeErrorLie (https://example.com/test.js:189:12)
    at getLies (https://example.com/test.js:534:39)
    at https://example.com/test.js:649:15
    at Array.forEach (<anonymous>)
    at searchLies (https://example.com/test.js:600:18)
    at getPrototypeLies (https://example.com/test.js:729:3)
    at https://example.com/test.js:772:58

this causing the issue

        try {
		const proto = obj.prototype ? obj.prototype : obj
		let res // response from getLies

		// search if function
		try {
			const apiFunction = proto[name] // may trigger TypeError
			if (typeof apiFunction == 'function') {
				res = getLies({
					apiFunction: proto[name],
					proto,
					lieProps: props
				})
				if (res.lied) {
					return (props[apiName] = res.lieTypes)
				}
				return
			}
			// since there is no TypeError and the typeof is not a function,
			// handle invalid values and ingnore name, length, and constants
			if (
				name != 'name' &&
				name != 'length' &&
				name[0] !== name[0].toUpperCase()) {
				const lie = [`failed descriptor.value undefined`]
				return (
					props[apiName] = lie
				)
			}
		} catch (error) { }
		// else search getter function
		const getterFunction = Object.getOwnPropertyDescriptor(proto, name).get
		res = getLies({
			apiFunction: getterFunction,
			proto,
			obj,
			lieProps: props
		}) // send the obj for special tests
		
		if (res.lied) {
			return (props[apiName] = res.lieTypes)
		}
		return
	} catch (error) {
		const lie = `failed prototype test execution`
		return (
			props[apiName] = [lie]
		)
	}

try block failed and triggered the error and when capturing the error above on the console

from creepjs.

flen201 avatar flen201 commented on June 20, 2024

specifically this error happens only when the proxied is property like Navigator.prototype.platform but proxying other functions like Element.prototype.setAttribute not causing any errors

from creepjs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.